A
Anonymous
Guest
I am trying to create a script that sends an e-mail. I am trying to test it from "localhost", but I don't have an SMTP email server on my computer. Therefore, I have no idea what I need to do to my php.ini settings to make it send a test email. Anyone ever use the mail() function and tested it on localhost? Any ideas what I need to do to get an email sent out without getting the following error?
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:\Program Files\Apache Group\Apache2\htdocs\surrogacy\add_surrogate.php on line 109
my code for sending the e-mail is as follows
Cheers!
Justin
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:\Program Files\Apache Group\Apache2\htdocs\surrogacy\add_surrogate.php on line 109
my code for sending the e-mail is as follows
Code:
<?php
if ($add_new_surrogate = mysql_query($add_new_surrogate_sql, $conn)) {
mail("justin.johnston@fizzyfishing.com", "surrogate added", "A new
surrogate has sent you an application.");
} else {
blah blah blah ...
?>
Cheers!
Justin