I have a GoDaddy Office 365 email account test@mydomain.com and am using PHPMailer to send out emails using SMTP.
Emails are hitting spam folders whenever my script sends them out, in the headers I can see the following message...
Received-SPF: None (protection.outlook.com: mydomain.com does not
designate permitted sender hosts)
The script is running from another domain mydomain2.com, I have 2 SPF records on mydomain.com set up that look like this...
v=spf1 include:spf.protection.outlook.com -all
v=spf1 include:mydomain2.com -all
Where am I going wrong? Do the records need to merged?
Yes, they do need to be merged. Merging those would look like this:
v=spf1 include:spf.protection.outlook.com include:mydomain2.com -all
Are you sure that's what you mean though? include:mydomain2.com
does not mean "allow sending from mydomain2.com"; it means "allow sending from the servers listed in the SPF record for mydomain2.com", which may be entirely different. It wouldn't surprise me if you needed to add an a
clause, or possibly an mx
instead of that include
, but I can't tell from the info you've posted.
Update - to simply designate the host that the domain points at as a sending host, and also the inbound mail server for your domain, do this instead:
v=spf1 a mx include:spf.protection.outlook.com -all