Exemple #1
0
 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();
     }
 }
Exemple #2
0
 /**
  * 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);
 }
Exemple #3
0
 /**
  * Creates NoOp Transport
  *
  * @param LoggerInterface $logger
  *
  * @since 2.0
  */
 public function __construct(LoggerInterface $logger, Config $config)
 {
     $this->setLogger($logger);
     parent::__construct($config);
 }
Exemple #4
0
 /**
  * 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);
 }