F
F
fedorenko_k2015-08-30 14:45:36
PHP
fedorenko_k, 2015-08-30 14:45:36

How to send messages?

Good afternoon, many of my users do not receive messages to Google mail, as well as Mail, although they come to Yandex instantly.
Here is my message sending script:

mail($user->email, $title, $message,
  "MIME-Version: 1.0\r\n"
  ."Content-type: text/html; charset=utf-8\r\n"
  ."X-Mailer: PHP/" . phpversion()
);

location ~ \.php$ {
  fastcgi_index index.php;
  fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f [email protected]<domain.zone>";
  fastcgi_pass unix:/var/www/php-fpm/gamepost.sock;
  fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  try_files $uri =404;
  include fastcgi_params;
}

Heard that some "<>" in messages are needed. Could you demonstrate how to do it right? It is desirable that you can also specify the "Name" of the sender, it is always displayed next to the mail.
Thanks to.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2015-08-30
@fedorenko_k

I'll show you how to do it right
www.mailgun.com
https://www.mandrill.com/
https://mailtrap.io/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question