- I have my own registered domain.
- I have a dedicated IP for my domain.
- I use a shared hosting service for my website.
I want to send mail with php's function
mail();. I have created one email account with my domain name.
The problem is that all the mail that I send using this function goes to the recipient's SPAM folder. I checked my domain name in several black lists but it's ok, it's not blacklisted.
When I send an email to a Gmail account, the next header appears:
firstname.lastname@example.org via cl02w01.xpress.com.mx (mysite.com is fictitious)
What should be the spf record for my domain? Considering that I have a dedicated IP, I use a shared hosting service which has a shared IP and that my mail is sent through cl02w01.xpress.com.mx according to Gmail.
UPDATE: I edited the SPF record for my site, it used to contain the dedicated IP address for my domain, it still contains my shared ip address because I'm using a cPanel wizard to create it and I can't remove it because it says the following:
The main server interface IP cannot be removed from this list if it is present. The following IP is the main server interface IP: xxx.xxx.xxx.xx
I don't understand this since I have a dedicated IP.
But now the messages are delivered in the recipient's inbox. I don't think just because I removed my dedicated IP address from the spf record now the messages are delivered correctly. Can someone explain this?