public function testMessage() { $message = new Message(); $this->assertEquals([], $message->getTo()); $message->addTo('*****@*****.**', 'John Smith'); $this->assertEquals(['*****@*****.**' => 'John Smith'], $message->getTo()); $message->addTo('James Smith <*****@*****.**>'); $this->assertEquals(['*****@*****.**' => 'John Smith', '*****@*****.**' => 'James Smith'], $message->getTo()); }
/** * Sends sign up email * * @param string $to */ public function sendSignUpMessage($to) { $message = new Message(); $message->addTo($to); $message->setSubject('Thanks for signing up!'); $message->setHtmlBody($this->createTemplate(APP_DIR . '/templates/emails/signUp.latte', ['to' => $to, 'subject' => $message->getSubject()])); $this->ISender->send($message); }