Skip to content

Commit

Permalink
Improving PR #6
Browse files Browse the repository at this point in the history
It is not necessary to confirm smtp protocol by providing the
requiresTLSUpgrade flag.
  • Loading branch information
RockfordWei committed Dec 29, 2017
1 parent b53f218 commit 3b6d656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/PerfectSMTP/PerfectSMTP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public class EMail {

// TO FIX: ssl requires a certificate, how to get one???
if client.url.lowercased().hasPrefix("smtps")
|| (client.url.lowercased().hasPrefix("smtp") && client.requiresTLSUpgrade) {
|| client.requiresTLSUpgrade {
let _ = curl.setOption(CURLOPT_USE_SSL, int: Int(CURLUSESSL_ALL.rawValue))

// otherwise just non-secured smtp protocol
Expand Down

0 comments on commit 3b6d656

Please sign in to comment.