RogerInHawaii Posted June 14, 2007 Share Posted June 14, 2007 I'm developing my web site and running it on my local machne during development. In my php.ini file I've set the SMTP to point to the smtp server out on the actual domain that will eventually host the site and set the sendmail_from to be one of my email accounts, already set up, on that domain. When I invoke mail() from my PHP code I receive an error message: SMTP server response: 553 Sorry, that domain isn't in my list of allowed rcpthosts I'm trying to send the email to [email protected], so it's unlikely that the problem is actually a disallowed rcpthost. Reading through posts elsewhere on the Internt I conclude that the real problem is that I'm not providing logon information (username and password) to the smtp server. (Via Outlook Express I can indeed send emails out through that smpt server, but Outlook Express allows me to specify the username and password for my domain). But the PHP mail() function does not appear to have any way to specify username and password. What do I need to do in order to tell the smtp server what my username and password is, so I can successfully use PHP mail() ? Link to comment https://forums.phpfreaks.com/topic/55511-php-mail-function-getting-553-error/ Share on other sites More sharing options...
DJTim666 Posted June 14, 2007 Share Posted June 14, 2007 EDIT: haha, I just read the whole post. Not sure what your problem is. I am guessing you need to check over all your settings. EDIT2: With the mail() function you do not need a password/username, nor do you need SMTP. Google "mail() examples", and I am sure you will find something useful Link to comment https://forums.phpfreaks.com/topic/55511-php-mail-function-getting-553-error/#findComment-274311 Share on other sites More sharing options...
RogerInHawaii Posted June 14, 2007 Author Share Posted June 14, 2007 EDIT: haha, I just read the whole post. Not sure what your problem is. I am guessing you need to check over all your settings. EDIT2: With the mail() function you do not need a password/username, nor do you need SMTP. Google "mail() examples", and I am sure you will find something useful Googling mail() is what I did before posting here with my problem. Nothing I found addresses the problem, but they do make clear that the PHP mail() function does indeed use the smtp mailserver that you specify within your php.ini file. I do realize that mail() itself does not have any accommodation for a username or password. What I'm asking for in this post is whether anyone knows where it is I need to specify the username and password. It doesn't seem to be in the php.ini file, and I am at a loss as to what other "setting' to look at. Link to comment https://forums.phpfreaks.com/topic/55511-php-mail-function-getting-553-error/#findComment-274317 Share on other sites More sharing options...
btherl Posted June 14, 2007 Share Posted June 14, 2007 Did you try googling "send mail with smtp with username and password in php" ? In case you get different results to me, here's my first result: http://email.about.com/od/emailprogrammingtips/qt/et073006.htm Link to comment https://forums.phpfreaks.com/topic/55511-php-mail-function-getting-553-error/#findComment-274407 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.