DNS record doesn't prevent email being seen as potential spam

fundaci3

New Member
Messages
3
Reaction score
0
Points
1
Hello, all. I'm looking for some help to prevent email message validation failures, and flagging as spam.

I use PHP mail() on my website to allow visitors to send me messages. In an effort to prevent those messages from landing in my Spam folder, I've set appropriate header values (e.g., "From", "Reply-To", etc.), and although the messages haven't actually been routed to the Spam folder, Gmail views them as potential spam or phishing attempts. A look at the "original message" details shows the following:

spf=softfail (google.com: domain of transitioning me@mydomain.x10host.com does not designate 123.45.67.890 as permitted sender) smtp.mailfrom=me@mydomain.x10host.com

As far as I can tell, what's needed is a DNS record that does designate the IP address in question as a permitted sender. So I added a record like the following via the cPanel, per some online research:

TXT mydomain.com. "v=spf1 ip4:123.45.67.890 ~all"

The result was that test messages sent from my site didn't come through at all, so I went back to cPanel to edit the DNS record I had created and found it had some additional options for me to select. Not really knowing which of the 3 mail-related options I should select (I'm kind of a newbie with DNS stuff), I went for all of them :p The resulting record became the following:

TXT mydomain.com. "v=spf1 mx a ptr ip4:123.45.67.890 ~all"

Now, test messages again arrive in my Gmail inbox, but I still have the "softfail" issue noted above. Can anyone offer me some guidance here? Thank you!
 

Eric S

Administrator
Staff member
Messages
836
Reaction score
119
Points
43
Using PHP mail to send emails to larger email providers will ALWAYS end with bad results. You should attempt to use an SMTP mailing setting instead to help with deliverability.
 

fundaci3

New Member
Messages
3
Reaction score
0
Points
1
Using PHP mail to send emails to larger email providers will ALWAYS end with bad results. You should attempt to use an SMTP mailing setting instead to help with deliverability.
Thanks for the reply, Eric!

I'm afraid I don't know how to go about "us[ing] an SMTP mailing setting", as you've recommended, however. Would you mind offering a little more detail on how that's done, to save me the trouble of googling it and possibly getting lost in a sea of information? Is that something I can do somewhere in the x10 cPanel, perhaps?
 

ctyrd

Active Member
Messages
797
Reaction score
73
Points
28
hello fundaci3

It is not really a dns issue. Most script like WordPress have smtp authorization options built in to the Administrator panel. The script has to have some passwd encryption to safely store in the shared server MySQL database. Shared hosting has some draw backs when it comes to email. Like no email at all. The x10 host still offers email for free. With a sending quota. It is very possible for a user to brake you quota unless you implement contact form restriction.

I found sending the contact form to one of your hosted email accounts (Not Default) a much safer method. Use Gmail to check the x10 server for new mail. Gmail will even sort the spam out for you.

Try GitHubs PHPMailer if you want to learn what is going on at the back end.
 

fundaci3

New Member
Messages
3
Reaction score
0
Points
1
hello fundaci3

It is not really a dns issue. Most script like WordPress have smtp authorization options built in to the Administrator panel. The script has to have some passwd encryption to safely store in the shared server MySQL database. Shared hosting has some draw backs when it comes to email. Like no email at all. The x10 host still offers email for free. With a sending quota. It is very possible for a user to brake you quota unless you implement contact form restriction.

I found sending the contact form to one of your hosted email accounts (Not Default) a much safer method. Use Gmail to check the x10 server for new mail. Gmail will even sort the spam out for you.

Try GitHubs PHPMailer if you want to learn what is going on at the back end.
Thanks for the info, ctyrd.

I'm sending messages straight to my Gmail account from the web form, so I'm not using x10's free email accounts at all (I didn't want to have to deal with quotas, etc.).

I'll take a look at PHPMailer to see what I can learn there.
 

Eric S

Administrator
Staff member
Messages
836
Reaction score
119
Points
43
Thanks for the info, ctyrd.

I'm sending messages straight to my Gmail account from the web form, so I'm not using x10's free email accounts at all (I didn't want to have to deal with quotas, etc.).

I'll take a look at PHPMailer to see what I can learn there.
You would be better off using the free hosting account using SMTP auth vs the standardized php mail.
 
Top