I am trying to send mail from contact form but unfortunately I don’t get any mail yet my code runs successfully. It shows that mail is sent but I haven’t received any mail. I don’t know what’s the issue. Does any one know about the solution?? They are welcome.
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
set_error_handler("var_dump");
ini_set("mail.log", "/tmp/mail.log");
ini_set("mail.add_x_header", TRUE);
$message = "Line 1\r\nLine 2\r\nLine 3";
$message = wordwrap($message, 70, "\r\n");
if(mail('abc@xyz.com', 'My Subject', $message))
{
echo $message." sent successfully";
}
?>
Thanks in advance :)