예제 #1
0
파일: Mailer.php 프로젝트: ajaboa/crmpuan
 /**
  * Create a new Mailer instance.
  * 
  * @var \Swift_SmtpTransport $transport. 
  * Optionally supply a transport class. If omitted a Transport 
  * object will be created that uses the smtp settings from config.php
  * 
  * @return Mailer
  */
 public static function newGoInstance($transport = false)
 {
     if (!$transport) {
         $transport = Transport::newGoInstance();
     }
     $mailer = new self($transport);
     return $mailer;
 }
예제 #2
0
 /**
  * Get the Transport object for this message (Based on the account)
  * 
  * @return mixed Transport/\GO\Email\Transport
  */
 public function getTransport()
 {
     if (!$this->hasAccount()) {
         return Transport::newGoInstance();
     } else {
         return \GO\Email\Transport::newGoInstance($this->_account);
     }
 }