예제 #1
0
 public function testTransportUsesPostageService()
 {
     $service = $this->getMock('SlmMail\\Service\\PostageService', array(), array('my-secret-key'));
     $transport = new HttpTransport($service);
     $message = new Message();
     $service->expects($this->once())->method('send')->with($this->equalTo($message));
     $transport->send($message);
 }
예제 #2
0
 public function testTransportUsesSesService()
 {
     $client = $this->getMock('Aws\\Ses\\SesClient', array(), array(), '', false);
     $service = $this->getMock('SlmMail\\Service\\SesService', array(), array($client));
     $transport = new HttpTransport($service);
     $message = new Message();
     $service->expects($this->once())->method('send')->with($this->equalTo($message));
     $transport->send($message);
 }
예제 #3
0
파일: Mandrill.php 프로젝트: swissup/email
 /**
  * Send a mail using this transport
  *
  * @return void
  * @throws \Magento\Framework\Exception\MailException
  */
 public function sendMessage()
 {
     try {
         $this->transport->send($this->message);
     } catch (\Exception $e) {
         $phrase = new \Magento\Framework\Phrase($e->getMessage());
         throw new \Magento\Framework\Exception\MailException($phrase, $e);
     }
     return true;
 }
예제 #4
0
파일: Ses.php 프로젝트: swissup/email
 /**
  * Send a mail using this transport
  *
  * @return void
  * @throws \Magento\Framework\Exception\MailException
  */
 public function sendMessage()
 {
     try {
         // \Zend_Debug::dump($this->message);
         // \Zend_Debug::dump($this->message->getHeaders());
         // die;
         $this->transport->send($this->message);
         // \Zend_Debug::dump(__LINE__);
         // die;
     } catch (\Exception $e) {
         $phrase = new \Magento\Framework\Phrase($e->getMessage());
         throw new \Magento\Framework\Exception\MailException($phrase, $e);
     }
     return true;
 }