hi guys,
i'm trying to test php mail on my LAMP configured ubuntu localhost.
here is the my piece of code:
<?php
$to = "myemail@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>");
}
?>
my php.ini edit:
sendmail_path = "/usr/sbin/sendmail -t"
SMTP = smtp.gmail.com
when i run the code it says message successfully sent!
but when i check my inox, there is nothing there.
what may be the problem?