Skip to content

Commit a5b4f9b

Browse files
committed
fix: now you can use SSL with port 465
But it is not recommended.
1 parent c5fee43 commit a5b4f9b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

system/Email/Email.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1870,9 +1870,13 @@ protected function SMTPConnect()
18701870

18711871
$ssl = '';
18721872

1873+
// Connection to port 465 should use implicit TLS (without STARTTLS)
1874+
// as per RFC 8314.
18731875
if ($this->SMTPPort === 465) {
18741876
$ssl = 'tls://';
1875-
} elseif ($this->SMTPCrypto === 'ssl') {
1877+
}
1878+
// But if $SMTPCrypto is set to `ssl`, SSL can be used.
1879+
if ($this->SMTPCrypto === 'ssl') {
18761880
$ssl = 'ssl://';
18771881
}
18781882

0 commit comments

Comments
 (0)