Hello i m newbie to PHP. I am trying to host the website on my laptop but due to some configuration i cant send the emails through php script. I am trying send mail through mail() but not able to sent mail.
heres the code:
$to = "jwalant.baria@gmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
Output:
Message delivery failed..
I read the previous post here. but I am not able to figure out what to do about it.
Can anyone tell me what setting i do in my php.ini? or any other that necessary settings require for this.
i don't have SMTP server on my laptop so is there any method from which i can setup the SMTP server on laptop.?
I use apache HTTP 2.2 and PHP 5.3.4
Rest of the website working correctly but only mail not working.
TY..!!