Jeaf Gilbert
Jeaf Gilbert

Reputation: 11981

Gmail is not receiving emails sent from Google App + PHPMailer

I'm using PHPMailer 5.2.0 and Google Apps for my domain email (let say my domain is mydomain.com).

Email sending works well, but Gmail accounts are not receiving the emails.

All sent emails appear in Sent Folder of Google App email.

It seems Gmail rejects the emails before it arrives even in Spam folder, doesn't it?

I read about SPF and am trying to create SPF record. There are 4 fields for TXT record: Name, TTL, Type, and TXT Data. I'm not sure with Name field, should it be mydomain.com?

Upvotes: 1

Views: 2545

Answers (1)

jjmontes
jjmontes

Reputation: 26904

Yes, the name of the entry is that of your mail domain (the part after the @). Depending on you DNS software or the administration interface of your domain, you may need to end it with a period:

Name: mydomain.com or mydomain.com.
TTL: 86400 
Type: TXT
TXT for Google Apps: v=spf1 include:_spf.google.com ~all

For example, Google returns the following SPF data (though this example is not for a Google Apps hosted MX):

$ dig google.com TXT

;; ANSWER SECTION:
google.com.     3189    IN  TXT "v=spf1 include:_netblocks.google.com ip4:216.73.93.70/31 ip4:216.73.93.72/31 ~all"

But since you use Google Apps, your SPF entry needs to conform their SMTP settings. Follow Google instructions for SPF records.

Upvotes: 4

Related Questions