Hi,
I have xampp/eclipse/windowsxp.
installed directory as follows:
php.ini > c/program files/xampp/php/php.ini
sendmail > c/program files/xampp/sendmail/sendmail.ini
xampp > c/program files/xampp
eclipse > c/program files/eclipse
what works:
http://localhost/xampp/
does not work.
http://localhost/aaa/sendMail.php
<?php
$to = "safiullah12@hotmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "safiullah12@hotmail.com";
$headers = "From: $from";
if(mail($to,$subject,$message,$headers)) {
echo 'mail was sent';
} else {
echo 'an error occured: mail was not sent';
}
?>
I am not sure how i can set up the sendmail.ini and php.ini file.
if i run this php file in eclipse, i get msg saying "msg sent" but i never got the email. I dont know whether i need to do something with php.ini file. or i need mail server. I am new to this.
Pls help.
php mail
Moderator: General Moderators
Re: php mail
Check for SMTP's value in the php.ini file on your Windows Box. The Port Number should be 25 and SMTP's value should be set to an SMTP Server's name or IP address (preferred).
Check whether it works or not.
Check whether it works or not.