Skip to content

Commit 3b6d656

Browse files
committed
Improving PR #6
It is not necessary to confirm smtp protocol by providing the requiresTLSUpgrade flag.
1 parent b53f218 commit 3b6d656

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/PerfectSMTP/PerfectSMTP.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ public class EMail {
391391

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

397397
// otherwise just non-secured smtp protocol

0 commit comments

Comments
 (0)