Login | Register | FAQ
Anonymous

mail() function

+ Post a reply

2 posts Page 1 of 1


mail() function

by futuregold » Sun Jun 26, 2011 1:07 pm

the mail function does not work, help appreciated, the following error message is reported for the code

mail($strEmail,$strSubject,$strMessage,"From:[email protected]");

I am using google chrome and windows XP

thanks narasimhan
-------------------------------------------------------------
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\xampp\learnnew\testmailaction.php on line 17
User avatar

futuregold

  • Posts: 2
  • Joined: Sun Jun 26, 2011 12:37 pm

Re: mail() function

by HTML.net » Sun Jun 26, 2011 5:48 pm

You need to have access to a mail server to use the mail() function. By default this is not the case in XAMPP.

If you have access to a open SMTP server you can use SSMTP. But I know nothing about setting up a local SMTP service.

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1184
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.


+ Post a reply

Page 1 of 1