V
V
Viktor Babiy2016-04-26 16:23:38
PHP
Viktor Babiy, 2016-04-26 16:23:38

Yandex mail sending mail php?

Hello!
There is a thank you page, the user enters it from an email received from the mailing list.
By clicking on the link button (an example of a link is site.ru/thanks/manager=victor&[email protected]&t...
he thereby sends a request to the manager that the link was followed and the manager calls him back, etc.
There is a simple php the code

$user_email = isset($_GET['email']) ? $_GET['email'] : '' ;
$user_telephone = isset($_GET['telephone']) ? $_GET['telephone'] : '' ;
$manager = isset($_GET['manager']) ? $_GET['manager'] : '' ;


switch($manager) {
  case 'victor' :
    $sendto = '[email protected]';
    break;
  case 'dobrinina' :
    $sendto = '[email protected]';
    break;
  default:
    $sendto='[email protected]';
}


$recepient = $sendto;
$sitename = "#Repost";

$msg  = "<html><body style='font-family:Arial,sans-serif;'>";
$msg  .= "<p><strong>Email:</strong> $user_email</p>";
$msg  .= "<p><strong>Телефон:</strong> $user_telephone</p>";

$pagetitle = "Заявка с рассылки! \"$sitename\"";

if(isset($_GET['manager'])) {
  mail($recepient, $pagetitle, $msg, "Content-type: text/html; charset=\"utf-8\"\n From: $sendto");
?>

Letters come to all popular mails, but letters do not come to yandex mail registered as - Mail for Domain.
Only this letter comes
Fwd: Mail delivery failed: returning message to sender  Распечатать
26 апр. в 16:22
Имя Имя <[email protected]>

Кому
xxx <[email protected]>


 
-------- Пересылаемое сообщение--------
26.04.2016, 16:21, "Mail Delivery System" <[email protected]>:
 
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  [email protected]
    Unknown user

------ This is a copy of the message, including all the headers. ------

Return-path: <[email protected]>
Received: from u0050601 by server109.hosting.reg.ru with local (Exim 4.72)
        (envelope-from <[email protected]>)
        id 1av2vE-0003fT-TH
        for [email protected]; Tue, 26 Apr 2016 16:21:00 +0300
Date: Tue, 26 Apr 2016 16:21:00 +0300
Message-Id: <[email protected]>
To: [email protected]
Subject: Заявка с рассылки! "#Repost"
X-PHP-Originating-Script: 705:index.php
Content-type: text/html; charset="utf-8"
 From: [email protected]
From: [email protected]

<html><body style='font-family:Arial,sans-serif;'><p><strong>Email:</strong> [email protected]</p><p><strong>Телефон:</strong> xxxx</p>

 
-------- Завершение пересылаемого сообщения --------
 
 
-- 
С уважением,

What could be the problem ??

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Kainazarov, 2016-04-26
@iit

1) Check if mail is configured correctly on the server, in the worst case, you will be banned and letters do not reach, or there is no mail server from the word at all, in a bad case, they go to spam and are not visible in the incoming ones, or you are in the spam lists from where you can unsubscribe
2) Check the correctness of the mail of managers
3) Check the managers, there were cases when the manager specifically said that the letters did not reach and suffered from garbage.
In general, it is better to use swiftmailer or api, for example mandril or mailgun, or maybe even amazone ses.
An ideal option when leads go directly to crm. If there is no crm, then managers can easily throw excuses. And so you can immediately see where the problems are and also the KPI of salespeople.

E
evnuh, 2016-04-26
@evnuh

Yandex tells you that the recipient's address is incorrect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question