i try to send an email via Symfony2 with SwiftMailer.
I have the next configuration in app/config.yml:
mailer_transport: smtp
mailer_encryption: tls
auth_mode: login
mailer_host: mail.manantiales.edu.ar
mailer_user: [email protected]
mailer_password: *******
And in the code:
$r = $this->get('mailer')->send($message);
if($r){
$session->getFlashBag()->add('ok_recovery', true);
$session->getFlashBag()->add('msg_recovery', 'Se ha enviado un correo electronico, a la casilla de correo ingresada, con su nueva clave. Recuerde, es posible que su cliente de correo coloque el email en SPAM.');
}else{
$session->getFlashBag()->add('ok_recovery', false);
$session->getFlashBag()->add('msg_recovery', 'Servidor ocupado.');
}
return $this->render('CommonBundle:Default:recuperarAcceso.html.twig',array());
The view render, and show the success message, but, after a seconds Symfony says:
Swift_TransportException: Failed to authenticate on SMTP server with username "[email protected]" using 2 possible authenticators
Any ideas ?