I have a website where people can recommend contents to their friends using their email. The issue is that emails are being flagged as spam whereas if I do the same from my development machine things are working out fine. I have enabled SPF and it is perfect.
When sending through website, the email appears as this in Gmail Inbox: From
[email protected] to
[email protected].
When I send it from my development machine it appears as : From
xyz.com via mywebsite.com to
[email protected] mailed by mywebsite.com and this is exactly how I envisioned it.
From what little I could figure out by looking at the source of emails in Gmail is that when sending from my development machine Gmail correctly recognizes my domain as mywebsite.com for which SPF is enabled and hence it treats it as genuine email. Whereas Gmail recognizes my domain as
[email protected] when sent through the website. Can someone tell me why it does so?
Any help would be really appreciated.