function SmtpTransport::send
Overrides AbstractTransport::send
File
-
vendor/
symfony/ mailer/ Transport/ Smtp/ SmtpTransport.php, line 135
Class
- SmtpTransport
- Sends emails over SMTP.
Namespace
Symfony\Component\Mailer\Transport\SmtpCode
public function send(RawMessage $message, ?Envelope $envelope = null) : ?SentMessage {
try {
$message = parent::send($message, $envelope);
} catch (TransportExceptionInterface $e) {
if ($this->started) {
try {
$this->executeCommand("RSET\r\n", [
250,
]);
} catch (TransportExceptionInterface) {
// ignore this exception as it probably means that the server error was final
}
}
throw $e;
}
$this->checkRestartThreshold();
return $message;
}