L
L
Light7772016-02-01 19:24:55
Yii
Light777, 2016-02-01 19:24:55

Why do emails go to spam when sent in Swiftmailer Yii2?

Why do emails end up in spam in Swiftmailer Yii2 contact form Email
goes to spam folder in mail.ru
Is there any way in swiftmailera or yii2 settings to make sure that emails do not end up in spam?
And if I send several letters from the same computer, then some do not even come to spam, although my site says that the letter was successfully sent
. UPD:
Will anything change if I send via smtp?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Matrozov, 2016-02-01
@Mear

You need to google about SPF and DKIM. Probably the mailers really did not appreciate the letters coming from your server and suspected them of spam. Here the option is either to send via a third-party smtp server (but there may be some limitations), or to take care of the issue that your letters would be "signed" according to the mind. Again, look at the contents of the headers of the letter received in mail.ru, there should be headers that determine the results of checking your letter for both "trusted" headers and the results of checking for spam.

I
irock, 2016-02-02
@irock

Everything is simple.
1) Your IP must have a reverse DNS zone. Google it.
2) In the settings of the domain from which you send letters, the SPF record must be correctly configured
For the host: @
Type: TXT
Value: v=spf1 a mx include:_spf.yandex.net ~all
v=spf1 is the protocol version
a - you can send emails from an IP that matches the
mx A-record - the same thing, only mail servers
include:_spf.yandex.net - connects mail IPs from Yandex if you use Yandex mail for a domain.
~all - excluding (prohibiting) everything else. Those. from all other addresses - this is spam.
If you are sending from a local machine and your IP address is constantly changing by the provider, then there is nothing you can do about it. Letters will either not reach at all, or fall into the spam folder (depending on where you send it and the severity of spam filters of services).
If your provider gives you a static IP, then ask to make you a reverse DNS zone for the domain you need through the support!
Moreover, the domain of the reverse DNS zone (for example, myhomedomain.com) does not have to match the domain from which you send mail (mysenddomain.com) - the point is that you have a reverse DNS zone in principle.
For example, with LeaseWeb, when ordering a VPS, you can enter the reverse DNS zone yourself.
I am 100% sure of my answer =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question