public function onSend(Envelope $envelope) { if (!$envelope->from()) { throw new \Exception("[core.email.ses] Amazon SES needs a registered `from` address", 1); } return Smtp::onSend($envelope); }
public function onSend(Envelope $envelope) { $results = []; $recipients = $envelope->to(); $envelope->to(false); foreach ($recipients as $to) { $results[$to] = mail($to, $envelope->subject(), $envelope->body(), $envelope->head()); } return $results; }
/** * @covers ByJG\Mail\Envelope::getBody * @covers ByJG\Mail\Envelope::setBody * @covers ByJG\Mail\Envelope::getBodyText */ public function testGetBody() { $this->object->setBody('<p><b>Some title</b></p><p>Other test<br/>Break</p>'); $this->assertEquals('<p><b>Some title</b></p><p>Other test<br/>Break</p>', $this->object->getBody()); $this->assertEquals("Some title\nOther test\nBreak\n", $this->object->getBodyText()); }
public function onSend(Envelope $envelope) { $results = []; foreach ($envelope->to() as $to) { $results[$to] = $this->SMTPmail($envelope->from(), $to, $envelope->build()); } return $results; }