/** * 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; }
/** * 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); } }