Skip to content

Commit ca372d2

Browse files
committed
1 parent 29552c7 commit ca372d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mail/SmtpMailer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ protected function connect(): void
135135
$errno, $error, $this->timeout, STREAM_CLIENT_CONNECT, $this->context
136136
);
137137
if (!$this->connection) {
138-
throw new SmtpException($error, $errno);
138+
throw new SmtpException($error ?: error_get_last()['message'], $errno);
139139
}
140140
stream_set_timeout($this->connection, $this->timeout, 0);
141141
$this->read(); // greeting

0 commit comments

Comments
 (0)