示例#1
0
 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());
 }
示例#2
0
 /**
  * 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);
 }