Jump to content
  • 0

Отправка заявки на почту


Юлия_36
 Share

Question

Выводится "Письмо отправлено" при попытки отправки заявки на почту на локальном сервере и на хостинге. Но сообщение не приходит на почту, как это можно исправить? Спам проверяла, там тоже письма нет.
Помогите, пожалуйста

oFt8w6OfcLs.jpg

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1
    $from = 'no-reply@mail.net (mail.net)';
    $date = new DateTime();
    $headers = '';
    $mail = 'login@mail.net';
    $subject = '=?utf-8?B?'.base64_encode('заголовок').'?=';
    $text = 'текст';
    $headers .= 'Content-Transfer-Encoding: utf-8'."\r\n";
    $headers .= 'Content-type:text/html; Charset=utf8'."\r\n";
    $headers .= 'From: '.$from."\r\n";
    $headers .= 'Reply-To: '.$from."\r\n";
    $headers .= 'Precedence: bulk'."\r\n";
    $headers .= 'Date: '.$date->format(DateTime::RFC2822)."\r\n";
    $result = mail($mail, $subject, $text, $headers,'-f'.$from);

Вот рабочий вариант, если не приходит на mail.ru, то нужно смотреть как настроена отправка почты у вас на сервере

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy