Closed
Description
In the chapter Creating & Sending Messages, the example shows the usage of a return object from MailerInterface::send().
/** @var Symfony\Component\Mailer\SentMessage $sentEmail */
$sentEmail = $mailer->send($email);
// $messageId = $sentEmail->getMessageId();
This is wrong, because the MailerInterface is returning void
.
interface MailerInterface
{
/**
* @throws TransportExceptionInterface
*/
public function send(RawMessage $message, Envelope $envelope = null): void;
}