Hi,
I want to send an email to myself. But I don’t receive it.
<?php
$to = '**********@gmail.com';
$subject = 'This is an email.';
$body = 'This is a test email'."\
\
".'Hope you got it';
$headers = 'From: someone@gmail.com';
if (mail($to, $subject, $body, $headers)) {
echo 'Email has been sent to '.$to;
} else {
echo 'There was an error sending the email.';
}
?>
Output:
Email has been sent to **********@gmail.com
Thank you!