Code: Select all
try {
if ($server) $smtp =& new Swift_Connection_SMTP($server); else $smtp =& new Swift_Connection_SMTP("localhost");
if ($smtp_user) $smtp->setUsername($smtp_user);
if ($password) $smtp->setpassword($password);
} catch (Exception $e) {
$this->setMessage ( 'Caught exception: '. $e->getMessage() );
return;
}
...and I'mFatal error: Uncaught exception 'Swift_ConnectionException' with message 'Authentication failed using username