December 7th, 2013, 03:58 PM
Mail function and authentication
I am using the PHP mail() function to send emails for verification to register on a site that I am developing. It was working at one time. Now I am getting the following error message:
Warning: mail(): SMTP server response: 503 you must authenticate first (#5.5.1)
This is not a problem on the web server just on my developing system but it was working at one time! I understand the authentication issue and I do realize that I cannot send the password associated with the "from" email address so I am wondering how it ever worked. The mail server that I use (Network Solutions) does require authentication. Again I am just perplexed as to how did it ever work?? Any thoughts or insights would be greatly appreciated.
Comments on this post
December 7th, 2013, 04:19 PM
Perhaps authentication was only turned on recently.
There are 10 kinds of people in the world. Those that understand binary and those that don't.
December 8th, 2013, 11:34 AM
If you mean by "Network Solutions" I doubt that. If you try to setup a mail box under Outlook it will not send mail without SMTP authentication turned on - 5 years ago! The other side of this issue implies that the Web Server "ISP system" must not require authentication? I think ultimately I am looking at changing to the Pear mail system. I just distrust unknowns they always come back to bite you! Thanks for your response "gw".
December 8th, 2013, 09:26 PM
I'd suggest you use PHPMailer, it's much more robust and secure than the built-in mail() function.
I can't post URLs as I'm a new user, but google it, it's in github, along with good examples.
Comments on this post
December 9th, 2013, 09:28 AM
Thanks for the suggestion "iforwms" and thanks also to "richpri" and "gw" for the comments on "iforwms" suggestion.
I am now convinced why mail() worked at one time is somewhere resident in "oblivion". What I did to confirm that it was indeed an authentication issue was download sendmail and front end mail() with its authentication provision. Once that was in place mail() was operational again. I will look into the PHPmailer application for I need to consider the problem of mail() under heavy load. I have been looking at the pear mail system as well. Again my thanks to all who have extended their time and expertise to assist me. It's always nice to know that there is "light in the tunnel".