SyntaxFix
Write A Post
Hire A Developer
Questions
If you are using cPanel you should just click the wee box that allows you to send to external servers by SMTP.
Login to CPanel > Tweak Settings > All> "Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak)"
As answered here:
"Password not accepted from server: 535 Incorrect authentication data" when sending with GMail and phpMailer