A
A
ArturSitnikoff2018-02-14 14:13:45
Email
ArturSitnikoff, 2018-02-14 14:13:45

How to send a letter from the site so that it reaches / does not fall into spam?

Good afternoon.
I send a letter from the site with the subject of the letter: "Confirmation of registration" and the text: "Link to activate the account:

http:/\/domain.ru/key/417d070cb8068b58dbbed1b7ecff9c9c_9a8650333998b27d8f645920966a0df3/"

Headers are here:
$headers = "From: [email protected]\r\ncontent-type:text/plain; charset=windows-1251\r\n";

Gmail does not reach at all, Mail.ru gets into spam.
If you buy a static IP on Gmail will it reach or not?
Maybe some headers can help solve the problem?
ps Missing code
$mail = $email;
$subject = iconv('utf-8', 'windows-1251', 'Завершение регистрации');
$headers = "From: [email protected] \r\ncontent-type:text/plain; charset=windows-1251\r\n";
$message = iconv('utf-8', 'windows-1251', 'Ссылка для активации аккаунта: ' . SERVER_NAME . '/key/' . $regkey . '/');
mail ($mail, $subject, $message, $headers));

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alex-1917, 2018-02-14
@ArturSitnikoff

At me at one on Yandex all clearly comes???
Author! Search for Toaster, scroll to the very top of the page, there is a search field, a gray one on a black background, or a black one on a gray background, I already chewed exactly the same in the poll !!!
In five words:
1. receive only and exclusively on a box from Yandex!
2. put a box on your domain as a sender, the box must exist!
3. do not test the sending once by the service station, in this case, Yandex will ban it!
4. the first or second letter may go to SPAM, click that this is not spam
5. enjoy
if a bathhouse comes here too, switch to smtp, a piece of code is longer by 500 characters in total.
Here they wrote above - DKIM, domain signatures, blabla ... forget it, this is not necessary. Who wants to mess around, he messes around, but why, if everything works like that?))) if there is no difference, why pay more?))
And the strategy of screening mail-ru and hum-mail has been present for five years already, the pancake woke up !!!

V
Vladislav Lyskov, 2018-02-14
@Vlatqa

spf dkim

O
OKyJIucT, 2018-02-14
@OKyJIucT

Use services for sending letters (for example, MailChimp), or write NS mail records to Yandex and send through it. Mail for the domain it has a service, you can configure sending via PHP.

R
Rsa97, 2018-02-14
@Rsa97

SPF, DKIM, DMARC, compliance with RFC standards (for example, using only the ASCII character set in headers)

B
Boris Korobkov, 2018-02-14
@BorisKorobkov

If you buy a static IP on Gmail will it reach or not?

It won't help at all.
It's easier to do this:
1. register a gmail account, configure sending via SMTP there
2. use any library for sending emails in the script, specify SMTP gmail, port, password, etc. from the previous paragraph
3. obviously, do not spam, unsubscribe, etc. good manners
If you want to send from your domain, then:
1. set up your mail server. But it is much easier to use ready-made services, for example, corporate mail Gmail, Yandex, etc.
2. SPF https://support.google.com/a/answer/178723?hl=ru https://support.google.com/a /answer/183895?hl=en
3. DKIM https://support.google.com/a/answer/174124?hl=en https://support.google.com/a/answer/2466563?hl=en

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question