* @package WoltLabSuite\Core\System\Email\Transport
* @since 3.0
*/
-class SmtpEmailTransport implements IEmailTransport
+class SmtpEmailTransport implements IStatusReportingEmailTransport
{
/**
* SMTP connection
* @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) {
return $item;
}, \explode("\r\n", $email->getEmail()))) . "\r\n");
$this->write(".");
- $this->read([250]);
+ [, $message] = $this->read([250]);
+
+ return $message;
}
}