public function __construct(Socket $connection, Config $config) { $this->connection = $connection; parent::__construct($config); $greeting = $this->read(); $code = $greeting->getCode(); if ($code !== 220) { throw new RuntimeException('Invalid greeting recieved.', $code); } $this->config['newline'] = "\r\n"; $this->sayHello(); if ($this->config['smtp']['starttls'] === true) { $this->invoke(new Command\Starttls($this)); $this->sayHello(); } }
/** * Creates Mandrill Transport * * @param MandrillObject $mandrill * @param Config $config * * @since 2.0 */ public function __construct(MandrillObject $mandrill, Config $config) { $this->mandrill = $mandrill; parent::__construct($config); }
/** * Creates NoOp Transport * * @param LoggerInterface $logger * * @since 2.0 */ public function __construct(LoggerInterface $logger, Config $config) { $this->setLogger($logger); parent::__construct($config); }
/** * Creates Mailgun Transport * * @param MailgunObject $mailgun * @param Config $config * * @since 2.0 */ public function __construct(MailgunObject $mailgun, Config $config) { $this->mailgun = $mailgun; parent::__construct($config); }