Author: Chris Corbyn
Inheritance: extends Swift_Transport_AbstractSmtpTransport, implements Swift_Transport_SmtpAgent
Esempio n. 1
0
 public function register(Application $app)
 {
     $app['swiftmailer.options'] = array_replace(array('host' => 'localhost', 'port' => 25, 'username' => '', 'password' => '', 'encryption' => null, 'auth_mode' => null), isset($app['swiftmailer.options']) ? $app['swiftmailer.options'] : array());
     $app['mailer'] = $app->share(function () use($app) {
         $r = new \ReflectionClass('Swift_Mailer');
         require_once dirname($r->getFilename()) . '/../../swift_init.php';
         return new \Swift_Mailer($app['swiftmailer.transport']);
     });
     $app['swiftmailer.transport'] = $app->share(function () use($app) {
         $transport = new \Swift_Transport_EsmtpTransport($app['swiftmailer.transport.buffer'], array($app['swiftmailer.transport.authhandler']), $app['swiftmailer.transport.eventdispatcher']);
         $transport->setHost($app['swiftmailer.options']['host']);
         $transport->setPort($app['swiftmailer.options']['port']);
         $transport->setEncryption($app['swiftmailer.options']['encryption']);
         $transport->setUsername($app['swiftmailer.options']['username']);
         $transport->setPassword($app['swiftmailer.options']['password']);
         $transport->setAuthMode($app['swiftmailer.options']['auth_mode']);
         return $transport;
     });
     $app['swiftmailer.transport.buffer'] = $app->share(function () {
         return new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory());
     });
     $app['swiftmailer.transport.authhandler'] = $app->share(function () {
         return new \Swift_Transport_Esmtp_AuthHandler(array(new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     });
     $app['swiftmailer.transport.eventdispatcher'] = $app->share(function () {
         return new \Swift_Events_SimpleEventDispatcher();
     });
     if (isset($app['swiftmailer.class_path'])) {
         $app['autoloader']->registerPrefix('Swift_', $app['swiftmailer.class_path']);
     }
 }
 public function register(Application $app)
 {
     $app['swiftmailer.options'] = array();
     $app['mailer.initialized'] = false;
     $app['mailer'] = $app->share(function ($app) {
         $app['mailer.initialized'] = true;
         return new \Swift_Mailer($app['swiftmailer.spooltransport']);
     });
     $app['swiftmailer.spooltransport'] = $app->share(function ($app) {
         return new \Swift_SpoolTransport($app['swiftmailer.spool']);
     });
     $app['swiftmailer.spool'] = $app->share(function ($app) {
         return new \Swift_MemorySpool();
     });
     $app['swiftmailer.transport'] = $app->share(function ($app) {
         $transport = new \Swift_Transport_EsmtpTransport($app['swiftmailer.transport.buffer'], array($app['swiftmailer.transport.authhandler']), $app['swiftmailer.transport.eventdispatcher']);
         $options = $app['swiftmailer.options'] = array_replace(array('host' => 'localhost', 'port' => 25, 'username' => '', 'password' => '', 'encryption' => null, 'auth_mode' => null), $app['swiftmailer.options']);
         $transport->setHost($options['host']);
         $transport->setPort($options['port']);
         $transport->setEncryption($options['encryption']);
         $transport->setUsername($options['username']);
         $transport->setPassword($options['password']);
         $transport->setAuthMode($options['auth_mode']);
         return $transport;
     });
     $app['swiftmailer.transport.buffer'] = $app->share(function () {
         return new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory());
     });
     $app['swiftmailer.transport.authhandler'] = $app->share(function () {
         return new \Swift_Transport_Esmtp_AuthHandler(array(new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     });
     $app['swiftmailer.transport.eventdispatcher'] = $app->share(function () {
         return new \Swift_Events_SimpleEventDispatcher();
     });
 }
 public function register(Container $app)
 {
     $app['swiftmailer.options'] = array();
     $app['swiftmailer.use_spool'] = true;
     $app['mailer.initialized'] = false;
     $app['mailer'] = function ($app) {
         $app['mailer.initialized'] = true;
         $transport = $app['swiftmailer.use_spool'] ? $app['swiftmailer.spooltransport'] : $app['swiftmailer.transport'];
         return new \Swift_Mailer($transport);
     };
     $app['swiftmailer.spooltransport'] = function ($app) {
         return new \Swift_Transport_SpoolTransport($app['swiftmailer.transport.eventdispatcher'], $app['swiftmailer.spool']);
     };
     $app['swiftmailer.spool'] = function ($app) {
         return new \Swift_MemorySpool();
     };
     $app['swiftmailer.transport'] = function ($app) {
         $transport = new \Swift_Transport_EsmtpTransport($app['swiftmailer.transport.buffer'], array($app['swiftmailer.transport.authhandler']), $app['swiftmailer.transport.eventdispatcher']);
         $options = $app['swiftmailer.options'] = array_replace(array('host' => 'localhost', 'port' => 25, 'username' => '', 'password' => '', 'encryption' => null, 'auth_mode' => null), $app['swiftmailer.options']);
         $transport->setHost($options['host']);
         $transport->setPort($options['port']);
         $transport->setEncryption($options['encryption']);
         $transport->setUsername($options['username']);
         $transport->setPassword($options['password']);
         $transport->setAuthMode($options['auth_mode']);
         if (null !== $app['swiftmailer.sender_address']) {
             $transport->registerPlugin(new \Swift_Plugins_ImpersonatePlugin($app['swiftmailer.sender_address']));
         }
         if (!empty($app['swiftmailer.delivery_addresses'])) {
             $transport->registerPlugin(new \Swift_Plugins_RedirectingPlugin($app['swiftmailer.delivery_addresses'], $app['swiftmailer.delivery_whitelist']));
         }
         return $transport;
     };
     $app['swiftmailer.transport.buffer'] = function () {
         return new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory());
     };
     $app['swiftmailer.transport.authhandler'] = function () {
         return new \Swift_Transport_Esmtp_AuthHandler(array(new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     };
     $app['swiftmailer.transport.eventdispatcher'] = function () {
         return new \Swift_Events_SimpleEventDispatcher();
     };
     $app['swiftmailer.sender_address'] = null;
     $app['swiftmailer.delivery_addresses'] = [];
     $app['swiftmailer.delivery_whitelist'] = [];
 }
Esempio n. 4
0
 public function __construct(\Swift_Transport_EsmtpTransport $transport, ConfigManager $config, ContainerInterface $container)
 {
     $mandrillApiKey = $config->get('atwix_mandrill.api_key');
     $mandrillApiUsername = $config->get('atwix_mandrill.api_username');
     if ($config->get('atwix_mandrill.enable_mandrill_integration') && !empty($mandrillApiKey) && !empty($mandrillApiUsername)) {
         $handlers = $transport->getExtensionHandlers();
         /** @var \Swift_Transport_Esmtp_AuthHandler $handler */
         $handler = reset($handlers);
         $transport->setHost($config->get('atwix_mandrill.smtp_host'));
         $transport->setPort($config->get('atwix_mandrill.smtp_port'));
         $handler->setPassword($mandrillApiKey);
         $handler->setUsername($mandrillApiUsername);
         \Swift_Mailer::__construct($transport);
     } else {
         $mailer = $container->get('mailer');
         parent::__construct($mailer, $container);
     }
 }
 protected function createSmtp(array $config)
 {
     $buffer = new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory());
     $auth = new \Swift_Transport_Esmtp_AuthHandler([new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()]);
     $transport = new \Swift_Transport_EsmtpTransport($buffer, [$auth], $this->dispatcher);
     $transport->setHost($config['host']);
     $transport->setPort($config['port']);
     $transport->setUsername($config['username']);
     $transport->setPassword($config['password']);
     $transport->setEncryption($config['encryption']);
     $transport->setAuthMode($config['auth_mode']);
     return $transport;
 }
 public function register(Container $c)
 {
     $c['swiftmailer.use_spool'] = true;
     $c['mailer.initialized'] = false;
     $c['mailer'] = function ($c) {
         $c['mailer.initialized'] = true;
         $transport = $c['swiftmailer.use_spool'] ? $c['swiftmailer.spooltransport'] : $c['swiftmailer.transport'];
         return new \Swift_Mailer($transport);
     };
     $c['swiftmailer.spooltransport'] = function ($c) {
         return new \Swift_Transport_SpoolTransport($c['swiftmailer.transport.eventdispatcher'], $c['swiftmailer.spool']);
     };
     $c['swiftmailer.spool'] = function ($c) {
         return new \Swift_MemorySpool();
     };
     $c['swiftmailer.transport'] = function ($c) {
         $settings = $c["settings"]["swiftmailer"];
         $transport = new \Swift_Transport_EsmtpTransport($c['swiftmailer.transport.buffer'], array($c['swiftmailer.transport.authhandler']), $c['swiftmailer.transport.eventdispatcher']);
         $settings = array_replace(array('host' => 'localhost', 'port' => 25, 'username' => '', 'password' => '', 'encryption' => null, 'auth_mode' => null), $settings);
         $transport->setHost($settings['host']);
         $transport->setPort($settings['port']);
         $transport->setEncryption($settings['encryption']);
         $transport->setUsername($settings['username']);
         $transport->setPassword($settings['password']);
         $transport->setAuthMode($settings['auth_mode']);
         return $transport;
     };
     $c['swiftmailer.transport.buffer'] = function ($c) {
         return new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory());
     };
     $c['swiftmailer.transport.authhandler'] = function ($c) {
         return new \Swift_Transport_Esmtp_AuthHandler(array(new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     };
     $c['swiftmailer.transport.eventdispatcher'] = function ($c) {
         return new \Swift_Events_SimpleEventDispatcher();
     };
 }
 /**
  * Gets the 'swiftmailer.mailer.default.transport.real' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('a27c38881fcb60cd7efcfc1aaed4ab1403ae65ca418be97b8f25c018e821ef41_1'), 1 => $this->get('a27c38881fcb60cd7efcfc1aaed4ab1403ae65ca418be97b8f25c018e821ef41_2'), 2 => $this->get('a27c38881fcb60cd7efcfc1aaed4ab1403ae65ca418be97b8f25c018e821ef41_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 protected function getSwiftmailer_Mailer_Default_TransportService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     $a->setUsername('ntcedisac\\dany');
     $a->setPassword('Stern0123');
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), new \Swift_Events_SimpleEventDispatcher());
     $instance->setHost('mail.citmatel.inf.cu');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
Esempio n. 9
0
 /**
  * @param \Swift_Transport_EsmtpTransport $transport
  *
  * @return DirectMailer
  */
 protected function addXOAuth2Authenticator($transport)
 {
     $handlers = $transport->getExtensionHandlers();
     $handlers = is_array($handlers) ? $handlers : [];
     foreach ($handlers as $handler) {
         if ($handler instanceof \Swift_Transport_Esmtp_AuthHandler) {
             $authenticators = $handler->getAuthenticators();
             $isOAuth2Exist = false;
             foreach ($authenticators as $authenticator) {
                 if ($authenticator instanceof \Swift_Transport_Esmtp_Auth_XOAuth2Authenticator) {
                     $isOAuth2Exist = true;
                 }
             }
             if (!$isOAuth2Exist) {
                 $authenticators[] = new \Swift_Transport_Esmtp_Auth_XOAuth2Authenticator();
                 $handler->setAuthenticators($authenticators);
             }
         }
     }
     return $this;
 }
 /**
  * Gets the 'swiftmailer.mailer.default.transport.real' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('98f9e47f70c98db529940fe5da780d308720fe2beba22f398dad16cfd866aa53_1'), 1 => $this->get('98f9e47f70c98db529940fe5da780d308720fe2beba22f398dad16cfd866aa53_2'), 2 => $this->get('98f9e47f70c98db529940fe5da780d308720fe2beba22f398dad16cfd866aa53_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
Esempio n. 11
0
 private function setupSwiftMailer()
 {
     $this['swiftmailer.transport'] = $this->share(function (Application $app) {
         if ($app['conf']->get(['registry', 'email', 'smtp-enabled'])) {
             $transport = new \Swift_Transport_EsmtpTransport($app['swiftmailer.transport.buffer'], [$app['swiftmailer.transport.authhandler']], $app['swiftmailer.transport.eventdispatcher']);
             $encryption = null;
             if (in_array($app['conf']->get(['registry', 'email', 'smtp-secure-mode']), ['ssl', 'tls'])) {
                 $encryption = $app['conf']->get(['registry', 'email', 'smtp-secure-mode']);
             }
             $options = $app['swiftmailer.options'] = array_replace(['host' => $app['conf']->get(['registry', 'email', 'smtp-host']), 'port' => $app['conf']->get(['registry', 'email', 'smtp-port']), 'username' => $app['conf']->get(['registry', 'email', 'smtp-user']), 'password' => $app['conf']->get(['registry', 'email', 'smtp-password']), 'encryption' => $encryption, 'auth_mode' => null], $app['swiftmailer.options']);
             $transport->setHost($options['host']);
             $transport->setPort($options['port']);
             // tls or ssl
             $transport->setEncryption($options['encryption']);
             if ($app['conf']->get(['registry', 'email', 'smtp-auth-enabled'])) {
                 $transport->setUsername($options['username']);
                 $transport->setPassword($options['password']);
                 $transport->setAuthMode($options['auth_mode']);
             }
         } else {
             $transport = new \Swift_Transport_MailTransport(new \Swift_Transport_SimpleMailInvoker(), $app['swiftmailer.transport.eventdispatcher']);
         }
         return $transport;
     });
 }
Esempio n. 12
0
<?php

use Pagekit\Mail\Mailer;
use Pagekit\Mail\Plugin\ImpersonatePlugin;
return ['name' => 'system/mail', 'main' => function ($app) {
    $app['mailer'] = function ($app) {
        $app['mailer.initialized'] = true;
        $mailer = new Mailer($app['swift.transport'], $app['swift.spooltransport']);
        $mailer->registerPlugin(new ImpersonatePlugin($this->config['from_address'], $this->config['from_name']));
        return $mailer;
    };
    $app['mailer.initialized'] = false;
    $app['swift.transport'] = function ($app) {
        if ('smtp' == $this->config['driver']) {
            $transport = new Swift_Transport_EsmtpTransport($app['swift.transport.buffer'], [$app['swift.transport.authhandler']], $app['swift.transport.eventdispatcher']);
            $transport->setHost($this->config['host']);
            $transport->setPort($this->config['port']);
            $transport->setUsername($this->config['username']);
            $transport->setPassword($this->config['password']);
            $transport->setEncryption($this->config['encryption']);
            $transport->setAuthMode($this->config['auth_mode']);
            return $transport;
        }
        if ('mail' == $this->config['driver']) {
            return Swift_MailTransport::newInstance();
        }
        throw new \InvalidArgumentException('Invalid mail driver.');
    };
    $app['swift.transport.buffer'] = function () {
        return new Swift_Transport_StreamBuffer(new Swift_StreamFilters_StringReplacementFilterFactory());
    };
 public function testExtensionsCanModifyRcptParams()
 {
     $buf = $this->_getBuffer();
     $dispatcher = $this->_createEventDispatcher();
     $smtp = new Swift_Transport_EsmtpTransport($buf, array(), $dispatcher);
     $ext1 = $this->getMockery('Swift_Transport_EsmtpHandler')->shouldIgnoreMissing();
     $ext2 = $this->getMockery('Swift_Transport_EsmtpHandler')->shouldIgnoreMissing();
     $ext3 = $this->getMockery('Swift_Transport_EsmtpHandler')->shouldIgnoreMissing();
     $message = $this->_createMessage();
     $message->shouldReceive('getFrom')->zeroOrMoreTimes()->andReturn(array('me@domain' => 'Me'));
     $message->shouldReceive('getTo')->zeroOrMoreTimes()->andReturn(array('foo@bar' => null));
     $buf->shouldReceive('readLine')->once()->with(0)->andReturn("220 server.com foo\r\n");
     $buf->shouldReceive('write')->once()->with('~^EHLO .+?\\r\\n$~D')->andReturn(1);
     $buf->shouldReceive('readLine')->once()->with(1)->andReturn("250-ServerName.tld\r\n");
     $buf->shouldReceive('readLine')->once()->with(1)->andReturn("250-AUTH PLAIN LOGIN\r\n");
     $buf->shouldReceive('readLine')->once()->with(1)->andReturn("250 SIZE=123456\r\n");
     $buf->shouldReceive('write')->once()->with("MAIL FROM:<me@domain>\r\n")->andReturn(2);
     $buf->shouldReceive('readLine')->once()->with(2)->andReturn("250 OK\r\n");
     $buf->shouldReceive('write')->once()->with("RCPT TO:<foo@bar> FOO ZIP\r\n")->andReturn(3);
     $buf->shouldReceive('readLine')->once()->with(3)->andReturn("250 OK\r\n");
     $this->_finishBuffer($buf);
     $ext1->shouldReceive('getHandledKeyword')->zeroOrMoreTimes()->andReturn('AUTH');
     $ext1->shouldReceive('getRcptParams')->once()->andReturn('FOO');
     $ext1->shouldReceive('getPriorityOver')->zeroOrMoreTimes()->with('AUTH')->andReturn(-1);
     $ext2->shouldReceive('getHandledKeyword')->zeroOrMoreTimes()->andReturn('SIZE');
     $ext2->shouldReceive('getRcptParams')->once()->andReturn('ZIP');
     $ext2->shouldReceive('getPriorityOver')->zeroOrMoreTimes()->with('AUTH')->andReturn(1);
     $ext3->shouldReceive('getHandledKeyword')->zeroOrMoreTimes()->andReturn('STARTTLS');
     $ext3->shouldReceive('getRcptParams')->never();
     $smtp->setExtensionHandlers(array($ext1, $ext2, $ext3));
     $smtp->start();
     $smtp->send($message);
 }
 protected function getSwiftmailer_Mailer_Default_TransportService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     $a->setUsername('*****@*****.**');
     $a->setPassword('OptimumDev12');
     $a->setAuthMode('login');
     $this->services['swiftmailer.mailer.default.transport'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), new \Swift_Events_SimpleEventDispatcher());
     $instance->setHost('smtp.gmail.com');
     $instance->setPort(465);
     $instance->setEncryption('ssl');
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 protected function getSwiftmailer_Mailer_Default_TransportService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('d7b86ba75496549983e49587f82792eac0988f5ebef144382419adbfa6a6b9ca_1'), 1 => $this->get('d7b86ba75496549983e49587f82792eac0988f5ebef144382419adbfa6a6b9ca_2'), 2 => $this->get('d7b86ba75496549983e49587f82792eac0988f5ebef144382419adbfa6a6b9ca_3')));
     $a->setUsername('*****@*****.**');
     $a->setPassword('Alaa_Essam');
     $a->setAuthMode('login');
     $this->services['swiftmailer.mailer.default.transport'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), new \Swift_Events_SimpleEventDispatcher());
     $instance->setHost('smtp.gmail.com');
     $instance->setPort(465);
     $instance->setEncryption('ssl');
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('44ba1d576d4e73d4c05726f38cbae9f87927f30a955c4d0f8dbe6c3cacd524bb_1'), 1 => $this->get('44ba1d576d4e73d4c05726f38cbae9f87927f30a955c4d0f8dbe6c3cacd524bb_2'), 2 => $this->get('44ba1d576d4e73d4c05726f38cbae9f87927f30a955c4d0f8dbe6c3cacd524bb_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
Esempio n. 17
0
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), ${($_ = isset($this->services['swiftmailer.mailer.default.transport.eventdispatcher']) ? $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] : $this->getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()) && false ?: '_'});
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     (new \Symfony\Bundle\SwiftmailerBundle\DependencyInjection\SmtpTransportConfigurator(NULL, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}))->configure($instance);
     return $instance;
 }
 /**
  * Gets the 'swiftmailer.transport' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_TransportService()
 {
     $this->services['swiftmailer.transport'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => new \Swift_Transport_Esmtp_AuthHandler(array(0 => new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()))), new \Swift_Events_SimpleEventDispatcher());
     $instance->setHost('localhost');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setUsername('');
     $instance->setPassword('');
     $instance->setAuthMode(NULL);
     $instance->registerPlugin($this->get('swiftmailer.plugin.messagelogger'));
     return $instance;
 }
 /**
  * Gets the 'swiftmailer.mailer.default.transport.real' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('d54a8ddab5fce5d4d524d69a8dae12a81a14bdbdad9ed3103bee3e1ca6ac84ca_1'), 1 => $this->get('d54a8ddab5fce5d4d524d69a8dae12a81a14bdbdad9ed3103bee3e1ca6ac84ca_2'), 2 => $this->get('d54a8ddab5fce5d4d524d69a8dae12a81a14bdbdad9ed3103bee3e1ca6ac84ca_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('fbe5301f910c639c1c013f768881337e461c1e67ffdf5e51bb32153dbd65cb50_1'), 1 => $this->get('fbe5301f910c639c1c013f768881337e461c1e67ffdf5e51bb32153dbd65cb50_2'), 2 => $this->get('fbe5301f910c639c1c013f768881337e461c1e67ffdf5e51bb32153dbd65cb50_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 /**
  * Gets the 'swiftmailer.mailer.default.transport.real' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('ddc9b75c3208b849b39b2acef2549b9cc4d2e7498782aa5bf96fa10aaeb1433b_1'), 1 => $this->get('ddc9b75c3208b849b39b2acef2549b9cc4d2e7498782aa5bf96fa10aaeb1433b_2'), 2 => $this->get('ddc9b75c3208b849b39b2acef2549b9cc4d2e7498782aa5bf96fa10aaeb1433b_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 /**
  * Gets the 'swiftmailer.mailer.default.transport.real' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('07f25c4798cf721483c05be953bf764e9459b199d973329d7feb85a1e1d9fe4c_1'), 1 => $this->get('07f25c4798cf721483c05be953bf764e9459b199d973329d7feb85a1e1d9fe4c_2'), 2 => $this->get('07f25c4798cf721483c05be953bf764e9459b199d973329d7feb85a1e1d9fe4c_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 /**
  * Gets the 'swiftmailer.mailer.default.transport' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_TransportService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('8677a13097c08f1070836dd4b85181f37aca11f7f70f281f9f1d6b015506d02f_1'), 1 => $this->get('8677a13097c08f1070836dd4b85181f37aca11f7f70f281f9f1d6b015506d02f_2'), 2 => $this->get('8677a13097c08f1070836dd4b85181f37aca11f7f70f281f9f1d6b015506d02f_3')));
     $a->setUsername('jp.ciphron');
     $a->setPassword('e4a7109f1');
     $a->setAuthMode('login');
     $this->services['swiftmailer.mailer.default.transport'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), new \Swift_Events_SimpleEventDispatcher());
     $instance->setHost('smtp.gmail.com');
     $instance->setPort(465);
     $instance->setEncryption('ssl');
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     $instance->registerPlugin($this->get('swiftmailer.mailer.default.plugin.messagelogger'));
     return $instance;
 }
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     $a->setUsername('AKIAIR3T4SCMIWOTAOWA');
     $a->setPassword('Ap3rzxOaji8sJUduNAp1+yQf3jTFXudxsivCg/S760lE');
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('email-smtp.us-east-1.amazonaws.com');
     $instance->setPort(25);
     $instance->setEncryption('tls');
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
Esempio n. 25
-1
 /**
  * Gets the 'swiftmailer.mailer.default.transport' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return \Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_TransportService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     $a->setUsername('surendra.yallabandi');
     $a->setPassword('ammananna');
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), new \Swift_Events_SimpleEventDispatcher());
     $instance->setHost('mx.valuelabs.net');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     $instance->registerPlugin($this->get('swiftmailer.mailer.default.plugin.messagelogger'));
     return $instance;
 }
 /**
  * Gets the 'swiftmailer.transport.real' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Transport_RealService()
 {
     $this->services['swiftmailer.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => new \Swift_Transport_Esmtp_AuthHandler(array(0 => new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()))), $this->get('swiftmailer.transport.eventdispatcher'));
     $instance->setHost('smtp.gmail.com');
     $instance->setPort(465);
     $instance->setEncryption('ssl');
     $instance->setUsername('*****@*****.**');
     $instance->setPassword('sleeper16');
     $instance->setAuthMode('login');
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 /**
  * Gets the 'swiftmailer.mailer.default.transport.real' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('665de88c677a082fc2a2b45ed4738dcd856bfd64c3e00992bac4586ec4a06522_1'), 1 => $this->get('665de88c677a082fc2a2b45ed4738dcd856bfd64c3e00992bac4586ec4a06522_2'), 2 => $this->get('665de88c677a082fc2a2b45ed4738dcd856bfd64c3e00992bac4586ec4a06522_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('a02e5a08f0a3c6fa23e65e5d13b7aa0449b4e21c7e042310edd9cb0956c8ac29_1'), 1 => $this->get('a02e5a08f0a3c6fa23e65e5d13b7aa0449b4e21c7e042310edd9cb0956c8ac29_2'), 2 => $this->get('a02e5a08f0a3c6fa23e65e5d13b7aa0449b4e21c7e042310edd9cb0956c8ac29_3')));
     $a->setUsername('*****@*****.**');
     $a->setPassword('bprop789');
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('smtp.gmail.com');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(), 1 => new \Swift_Transport_Esmtp_Auth_LoginAuthenticator(), 2 => new \Swift_Transport_Esmtp_Auth_PlainAuthenticator()));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }
 /**
  * Gets the 'swiftmailer.mailer.default.transport.real' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return Swift_Transport_EsmtpTransport A Swift_Transport_EsmtpTransport instance.
  */
 protected function getSwiftmailer_Mailer_Default_Transport_RealService()
 {
     $a = new \Swift_Transport_Esmtp_AuthHandler(array(0 => $this->get('4a957f2c667c0755b996fba6a09814c6353b4ffd00037a541a91b088a9b5e76b_1'), 1 => $this->get('4a957f2c667c0755b996fba6a09814c6353b4ffd00037a541a91b088a9b5e76b_2'), 2 => $this->get('4a957f2c667c0755b996fba6a09814c6353b4ffd00037a541a91b088a9b5e76b_3')));
     $a->setUsername(NULL);
     $a->setPassword(NULL);
     $a->setAuthMode(NULL);
     $this->services['swiftmailer.mailer.default.transport.real'] = $instance = new \Swift_Transport_EsmtpTransport(new \Swift_Transport_StreamBuffer(new \Swift_StreamFilters_StringReplacementFilterFactory()), array(0 => $a), $this->get('swiftmailer.mailer.default.transport.eventdispatcher'));
     $instance->setHost('127.0.0.1');
     $instance->setPort(25);
     $instance->setEncryption(NULL);
     $instance->setTimeout(30);
     $instance->setSourceIp(NULL);
     return $instance;
 }