Using mail() with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mhamilton3
Forum Newbie
Posts: 1
Joined: Tue Dec 16, 2003 11:54 pm

Using mail() with PHP

Post by mhamilton3 »

I have what I hope is a very easy question. I am a perl person not a php person, but I have a script that I inherited that is having an issue. The code uses mail() to send a confirmation email. There is no check for return codes on the call to mail. Are there reasons why mail would fail. I have many places where I am assured the code ran, but an email is never received and I checked the server and it does not register an email being sent. Just looking for a suggestion on what to do. I don't have any PHP documentation so I am about to look for return codes for mail(), but if you have return codes that would be cool. Thanks.
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

In your php.ini have you specified your smtp server? or the location of sendmail?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Are you checking to see if it works with an @aol.com address?
User avatar
Saethyr
Forum Contributor
Posts: 182
Joined: Thu Sep 25, 2003 9:21 am
Location: Wichita, Kansas USA
Contact:

Post by Saethyr »

Post your code, this will help a bit, don't post anything important just the mail code.


Saethyr
Post Reply