Código PHP:
$app['swiftmailer.options'] = array(
'host' => 'smtp.gmail.com',
'port' => '465',
'username' => '[email protected]',
'password' => 'pass',
'encryption' => 'ssl',
'auth_mode' => 'login'
);
$app->register(new SilexProviderSwiftmailerServiceProvider());
Código PHP:
$app->register(new SilexProviderSwiftmailerServiceProvider(), array(
'swiftmailer.options' => array(
'host' => 'smtp.gmail.com',
'port' => 465,
'username' => '[email protected]',
'password' => 'pass',
'encryption' => 'ssl',
'auth_mode' => 'login')
));
Código PHP:
$app['opciones_email_news'] = array(
'host' => 'smtp.gmail.com',
'port' => '465',
'username' => '[email protected]',
'password' => 'pass',
'encryption' => 'ssl',
'auth_mode' => 'login'
);
$message = Swift_Message::newInstance( $app['opciones_email_news'] )
->setSubject('News')
->setFrom($app['email_news'])
->setTo($to)
->setBcc($bcc)
->setBody('hola');
$app['mailer']->send($message);