8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c6a0be2 + 9f7c485 commit 498284eCopy full SHA for 498284e
src/Symfony/Component/Mailer/Transport/Smtp/Stream/SocketStream.php
@@ -167,7 +167,14 @@ public function initialize(): void
167
168
public function startTLS(): bool
169
{
170
- return (bool) stream_socket_enable_crypto($this->stream, true);
+ set_error_handler(function ($type, $msg) {
171
+ throw new TransportException('Unable to connect with STARTTLS: '.$msg);
172
+ });
173
+ try {
174
+ return stream_socket_enable_crypto($this->stream, true);
175
+ } finally {
176
+ restore_error_handler();
177
+ }
178
}
179
180
public function terminate(): void
0 commit comments