I created a website to send a letter to Santa (actually sends it to your parents) and it works perfectly fine on all of my email accounts. I have received feedback that Gmail is ignoring the emails, so I tested it and sure enough they never show up. I'm guessing it has to do with my email headers? I'm not experienced enough at PHP to know how to change the from address to not be from the recipient.
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
Those are my headers. The full PHP can be found at https://pastebin.com/SLtZ6GxN and the html can be found on the website at dearsanta.fun
Thanks for reading.
I tried changing the headers to:
$headers = 'From: santa@dearsanta.fun' . "\r\n".
'Reply-To: santa@dearsanta.fun' "\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
and now on submit I am redirected to a white page and the address it to the php form. So the answer given in the other thread seems to have broken my script.