Have moved to a new server and now the authentication won't work. I'm using the same credentials as i use successfully in outlook.
The code I'm using:
Code: Select all
$connection = new Swift_Connection_SMTP($mail_server);
$mailer = new Swift($connection);
$mailer->loadAuthenticator(new Swift_Authenticator_LOGIN);
if(! $mailer->authenticate($mail_username,$mail_password ))
{
doLog("Failed to authenticate email", $logErrors);
exit();
}Any suggestions as to what I might be doing wrong or how I might get better info from the package as to where it is going wrong (The instantiation and function calls leading up to the authentication return TRUE, but not sure how meaningful that is)?