public function testEmailSends() { // Note this test only confirms the email has made it to the provider. $email = new SimpleEmail(); $email->AddRecipient("*****@*****.**")->SetText("This is a test email")->Send(); $lastEmail = UnitTestingEmailProvider::GetLastEmail(); $this->assertEquals($email, $lastEmail); }
/** * @return Communication * @throws \Rhubarb\Stem\Exceptions\RecordNotFoundException */ public function createCommunicationForEmail() { $email = new SimpleEmail(); $email->setSubject("The three billy goats"); $email->addRecipient("*****@*****.**", "John Smith"); $email->setSender("*****@*****.**", "Jane Smith"); $email->setText("Michael went to mow, went to mow a meadow."); $email->setHtml("<p>Michael went to mow, went to mow a meadow.</p>"); return Communication::fromEmail($email); }