M
M
Maratins2015-09-01 14:01:40
PHP
Maratins, 2015-09-01 14:01:40

How to configure the server so that emails do not go to spam?

I use DigitalOcean.com VPS and a mail()PHP function to send emails. For some reason, absolutely all emails end up in the SPAM folder on gmail.
Previously, hosting was from timeweb.ru, all letters were sent to INBOX.
How can I prevent emails from going to spam on my server?
- the script code has not changed.
- I have little experience in administering servers, please give a detailed and understandable answer for beginners
- there are no separate mail-related records in domain dns
- nginx is installed on the server and postfix is ​​not configured (everything that is specified there in the settings is host - "home ")
- there are no additional settings for mail on the server, there is bare php5.
The implementation of this question from Timeweb is also interesting - in all letters there is a postscript "via mustang.timeweb.ru".
b9b4c547c40f4f2daeab1711a5959418.png
Can you do the same for yourself?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Yamschikov, 2015-09-01
@mobilesfinks

(I am not familiar with DIgitalOcean, so if anything, then please do not kick)
Is your domain configured properly?
SPF record?
DMARC policy?
DKIM signature of letters?
As I understand it, you send directly from your VPS, and not through a mail gateway.
You have 2 options:
1) Set up a domain and mail server
2) Set up mail forwarding through the mail gateway k.l. mail provider.
I think in your case it's easier to do the second option.

M
My joy, 2015-09-01
@t-alexashka

Swift Mailer will not help if the necessary records are not configured in the domain, and postfix is ​​not configured.
Strange, usually everyone tries to get rid of it :)

R
rickl, 2016-03-16
@rickl

Digitalocean sets up a PTR record automatically, but your droplet must have your domain name to do so.
A PTR record is a reverse record that mail services, when receiving a letter, check before accepting the mail. If this entry does not exist or it does not match your domain, then the mailer's trust in your domain will be low.
mihail.space/articles/installation-postfix-v-debian-j...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question