I am trying to use PHPMailer to send e-mails over SMTP but so far have had no luck. I\'ve gone through a number of SO questions, PHPMailer tutorials and forum posts but stil
I got a similar failure with SMTP whenever my client machine changes network connection (e.g., home vs. office network) and somehow restarting network service (or rebooting the machine) resolves the issue for me. Not sure if this would apply to your case, but just in case.
sudo /etc/init.d/networking restart # for ubuntu