A
A
AlexLichi2017-09-04 07:40:40
PHP
AlexLichi, 2017-09-04 07:40:40

Why doesn't the server want to send emails with the mail() function?

Installed Vesta (fresh) on CentOS 7.3.1611 x64
, moreover, I have a certain php file running in cron and there are some errors and such letters (in the spam folder) arrive on my soap registered in Vesta with the title:
(Cron Daemon) <[email protected]>
and text:
PHP Notice: Undefined index: SERVER_PROTOCOL in /home/admin/web/my-domen.ru/public_html/file.php on line 21
PHP Notice: Undefined index: SERVER_PROTOCOL in /home/admin/web/my-domen.ru/public_html /file.phpp on line 21
PHP Notice: Undefined index: SERVER_PORT in /home/admin/web/my-domen.ru/public_html/file.php on line 22
PHP Notice: Undefined index: SERVER_PORT in /home/admin/web /my-domain.ru/public_html/file.php on line 22
PHP Notice: Undefined index: SERVER_NAME in /home/admin/web/my-domen.ru/public_html/file.php on line 24
PHP Notice: Undefined index: REQUEST_URI in /home/admin/web/my-domen.ru/ public_html/file.php on line 24
ps aux | grep sendmail
root 10324 0.0 0.1 112648 968 pts/0 R+ 03:59 0:00 grep --color=auto sendmail
After executing the mail() function on the server, empty files are created in the var/log/ folder:
messages-20170903
maillog-20170903
Karoch I tested with another soap. I sent it to mail.ru and it ended up in the spam folder, but it came. And gmail.com doesn't even come to the spam folder! Such nonsense, I don’t know, can I somehow fix this in the gmail settings? I doubt it, of course.
Karoch I removed from some letters(Cron Daemon) <[email protected]>
the spam label and started my letters at least coming to spam.
Is there any way to remove the notification about these php errors? Preferably this particular php file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Gorelov, 2017-09-04
@Kirill-Gorelov

After executing the mail() function on the server, empty files are created in the var/log/ folder:

- that's how it should be. the fact that empty means you are not sending anything, most likely, you need to flatter the code.
-it would not be bad to attach a piece of code, maybe there is some kind of error (but as an option, you can debug it)
And just so that it would not fly into spam, I would configure dkim / spf / dmarc
---- I would do that. This is purely my opinion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question