We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5066845 commit 4129965Copy full SHA for 4129965
src/Mail/SmtpMailer.php
@@ -149,7 +149,11 @@ protected function connect(): void
149
150
if ($this->secure === 'tls') {
151
$this->write('STARTTLS', 220);
152
- if (!stream_socket_enable_crypto($this->connection, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
+ if (!stream_socket_enable_crypto(
153
+ $this->connection,
154
+ true,
155
+ STREAM_CRYPTO_METHOD_TLS_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
156
+ )) {
157
throw new SmtpException('Unable to connect via TLS.');
158
}
159
$this->write("EHLO $this->clientHost", 250);
0 commit comments