Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP Mail() function, getting 553 error

Newbie
 
Join Date: Jun 2007
Posts: 13
#1: Jun 14 '07
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:

Expand|Select|Wrap|Line Numbers
  1. SMTP server response: 553 Sorry, that domain isn't in my list of allowed rcpthosts
  2.  
I'm trying to send the email to MyUsername@aol.com, 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() ?

Motoma's Avatar
Moderator
 
Join Date: Jan 2007
Location: Maine, USA
Posts: 2,904
#2: Jun 14 '07

re: PHP Mail() function, getting 553 error


PHP's built in mail() function does not allow SMTP Authentication. You could try the PEAR Mail package, or try writing your own with fsockopen().
Newbie
 
Join Date: Jun 2007
Posts: 13
#3: Jun 14 '07

re: PHP Mail() function, getting 553 error


Oh boy. Yet another package to download, install, learn, get confused by, and spend hours getting working right.

Thanks, :)
Motoma's Avatar
Moderator
 
Join Date: Jan 2007
Location: Maine, USA
Posts: 2,904
#4: Jun 14 '07

re: PHP Mail() function, getting 553 error


Good luck. Come back if you have any other questions.
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#5: Jun 14 '07

re: PHP Mail() function, getting 553 error


Quote:

Originally Posted by RogerInHawaii

Oh boy. Yet another package to download, install, learn, get confused by, and spend hours getting working right.

Yes... computer programming. Wonderful, isn't it? :)

[EDIT: Computers in general, come to think of it....]
Motoma's Avatar
Moderator
 
Join Date: Jan 2007
Location: Maine, USA
Posts: 2,904
#6: Jun 14 '07

re: PHP Mail() function, getting 553 error


Hey, computers are easier to understand than people!
Purple's Avatar
Moderator
 
Join Date: May 2007
Location: UK - North West
Posts: 385
#7: Jun 15 '07

re: PHP Mail() function, getting 553 error


and they generally do what they are asked - and there in lies the issue....
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#8: Jun 15 '07

re: PHP Mail() function, getting 553 error


Quote:

Originally Posted by Purple

and they generally do what they are asked - and there in lies the issue....

My sig (which currently doesn't show up in the forums):
Quote:

Originally Posted by pbmods

The exciting part of computer programming is getting a machine that does exactly what you tell it to do... to do what you want it to do.

Reply