Creates a new message.
public getMessage ( array | |
||
$config | array | |
(Optional) |
Résultat | Webiny\Component\Mailer\MessageInterface |
public function testSend() { $mailer = new Mailer(); $message = $mailer->getMessage(); $message->setTo(new Email('*****@*****.**', 'Webiny'))->setBody('Testing')->setSubject('PHPUnit test'); $result = $mailer->send($message); $this->assertNotFalse($result); // this test might fail if sendmail is not configured }