send() public method

Sends the mail
public send ( ) : AcMailer\Result\ResultInterface
return AcMailer\Result\ResultInterface
Ejemplo n.º 1
0
 public function testStringBypassedBodyIsWrappedIntoMimePartWithAttachments()
 {
     $cwd = getcwd();
     chdir(dirname(__DIR__));
     $this->mailService->setAttachments(array('attachments/file1', 'attachments/file2'));
     $this->mailService->getMessage()->setBody('Btpassed body as string');
     $result = $this->mailService->send();
     $this->assertTrue($result->isValid());
     /* @var Mime\Message $body */
     $body = $this->mailService->getMessage()->getBody();
     $this->assertInstanceOf('Zend\\Mime\\Message', $body);
     chdir($cwd);
 }