You must also add this IP address to the Email Whitelist box in your Google Apps control panel. It seems unlikely that change could have triggered this problem, but I mention it in case it could be a factor.Įdit: Found which says ".you must configure an SPF record for your domain with the IP address of the device or application to ensure that recipients do not reject mail sent from it. The account is on a cPanel system that recently upgraded to PHP 5.3.5 and Apache 2.2.22. I did a var_dump() of the $smtp object, and confirmed my address and password were passed into it successfully and accurately. I also set the host to "" instead of "" per a suggestion in another SO thread. I also tried specifying tls:// and port 587, no luck. This account is a business domain address, not am trying to connect at: $host = "ssl://" It worked, so I know my parameters are correct. I copied and pasted the address and password from my script into the Gmail login in my browser. I double-checked that the login for the mail user had not been changed since January. The error message is: authentication failure
MAC MAIL GMAIL AUTHENTICATION FAILED CODE
I am using code identical to that posted by pavan kumar at Send email using the GMail SMTP server from a PHP page. I have the exact same problem as described at SMTP Error 535 (Incorrect authentication data) using PEAR mail There have been no answers to that question and it won't allow me to comment, so I'm starting a new question. Now, as I prep the site for the fall, this page no longer works. The page is only active in the fall and winter, and it was working great when it was last used in January. I have a PHP page that uses PEAR Mail to send a message through a Google Apps mail account.