From: Tim Düsterhus Date: Mon, 15 Feb 2021 11:15:54 +0000 (+0100) Subject: Return status message in SmtpEmailTransport::deliver() X-Git-Tag: 5.4.0_Alpha_1~252^2~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b17d3ee2e7c3ccda4feecbeb01fbf4704d373058;p=GitHub%2FWoltLab%2FWCF.git Return status message in SmtpEmailTransport::deliver() --- diff --git a/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php b/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php index ee86f9b4aa..1398ce18b7 100644 --- a/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php +++ b/wcfsetup/install/files/lib/system/email/transport/SmtpEmailTransport.class.php @@ -20,7 +20,7 @@ use wcf\util\StringUtil; * @package WoltLabSuite\Core\System\Email\Transport * @since 3.0 */ -class SmtpEmailTransport implements IEmailTransport +class SmtpEmailTransport implements IStatusReportingEmailTransport { /** * SMTP connection @@ -426,7 +426,7 @@ class SmtpEmailTransport implements IEmailTransport * @throws \Exception * @throws PermanentFailure */ - public function deliver(Email $email, Mailbox $envelopeFrom, Mailbox $envelopeTo) + public function deliver(Email $email, Mailbox $envelopeFrom, Mailbox $envelopeTo): string { // delivery is locked if ($this->locked instanceof \Exception) { @@ -468,6 +468,8 @@ class SmtpEmailTransport implements IEmailTransport return $item; }, \explode("\r\n", $email->getEmail()))) . "\r\n"); $this->write("."); - $this->read([250]); + [, $message] = $this->read([250]); + + return $message; } }