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 a455d59 commit 01d8181Copy full SHA for 01d8181
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