I made a a php form where users can fill it up and when they press the submit button, it mails the feedback to my chosen email address. The only problem is when I put the 'from' email as [email protected], it doesn't work. The email will be sent but it will be sent from '[email protected]'.
After that I tested my gmail address under the 'from' header. This time it worked. The email's from header is '[email protected]'. I was wondering why does it work on gmail but not for my domain?
It is not your problem. gmail smtp server does not allow the difference from email.
If you use your own smtp server, then u can see that's ok..
Remark:
if smtp account email and from email is not same, then email may be spammed.
You can use Reply-To email address for get reply mail or feedback mail.