How to catch exceptions??
Posted: Tue Feb 17, 2009 1:28 pm
why isn't this working???
instead of catching it, I get a

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