Hotmail rejects php email

My site sends activation letters to new members using the php mail () function. I manage my email accounts using google email service (aspmx.googlemail.com). But unfortunately, Hotmail users receive activation email in their junk folder.

I did some research and found out about the SPF record (I can’t use keys since I have limited control over my web server). So how do I set up my SPF record?

Now I have:

v=spf1 a mx a:mywebsite.net include:aspmx.googlemail.com ~all

Will it be what I need?

EDIT: Now I used PHPMailer to connect to the Google SMTP server. Hotmail no longer marks them as unwanted in this way. ( http://sourceforge.net/projects/phpmailer/ )

+3
source share
2 answers

PHP mail()probably doesn't use smtp to send your emails. I would consider adding the appropriate headers and using a spam counter to help you in your chances, or you can try using smtp through Google's mail servers (although I'm sure this is unlikely).

Here is the spam counter:

http://www.contactology.com/check_mqs.php

Here is an example of some email headers, be sure to include your From header, as its default is probably not suitable for spam filters:

$headers  = "From: My site<noreply@my_site.com>\r\n";
$headers .= "Reply-To: info@my_site.com\r\n";
$headers .= "Return-Path: info@my_site.com\r\n";
$headers .= "X-Mailer: Drupal\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail($recipient, $subject, $message, $headers);
+3
source

To use this SPF record, you need to add it to your DNS zone file.

DNS TXT.

:

mywebsite.net. IN TXT "v = spf1 a mx a: mywebsite.net : aspmx.googlemail.com ~ " mailserver.mywebsite.net. IN TXT "v = spf1 a mx a: mywebsite.net : aspmx.googlemail.com ~ "

http://www.openspf.org/

, , .

todo - " " Hotmail. - , , , . , . , " ".

+3

Source: https://habr.com/ru/post/1738572/


All Articles