PHP mail() function not working for me

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
Jackie
Forum Newbie
Posts: 2
Joined: Mon May 07, 2007 10:06 am

PHP mail() function not working for me

Post by Jackie »

Please I used the mail() function in my code but when I tested it on my server, it didn't send any emails out. Do I need to do any configuration on the server to send out emails from my script??
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Probably yes. see http://de2.php.net/mail
You might also be interested in http://sourceforge.net/projects/swiftmailer and viewforum.php?f=52
Jackie
Forum Newbie
Posts: 2
Joined: Mon May 07, 2007 10:06 am

php mail() function

Post by Jackie »

Please can someone elaborate more on this. I'm a young php user, running php on a windows platform but its not sending out emails. Do i need to configure my server or the php.ini file and how do I go about it?

Thank you.
User avatar
dhrosti
Forum Commoner
Posts: 90
Joined: Wed Jan 10, 2007 5:01 am
Location: Leeds, UK

Post by dhrosti »

stolen from one of my books...

"On Windows, mail() sends using SMTP, the name of the relay server must be defined in php.ini".

It's all explained in the first link volka gave you
Post Reply