Help with php mail() function, XAMPP package

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
mscardenas
Forum Newbie
Posts: 5
Joined: Wed May 30, 2007 1:18 am

Help with php mail() function, XAMPP package

Post by mscardenas »

Hi all,

I've just installed the latest of the XAMPP package (php5.2.1, mysql5.0.37, apache2, etc). Now I created a form which uses php's mail() function to mail me the form a user has filled up.
I have set the php.ini file in the apache/bin directory to SMTP: http://www.ISPadd.com (my ISP's address), smtp_port = 25, and sendmail_from = mscardenas@yahoo.com (my email address). But I always get this error:

Warning: mail() [function.mail]: Failed to connect to mailserver at "www.ISPadd.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

I tried sending mail using Mercury mail (bundled with XAMPP), and it has successfully send mail. The problem is I don't know how to access Mercury mail through my php form, and I like php's mail() function to handle it. Anyone have an idea what's the error, o how to fix it? Thanks.:)
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

I believe this is because http://www.ISPadd.com does not exists or it's port 25 does not accept incoming connections, just did telnet and it failed.
Post Reply