Help me please. I do not understand the reason. Thomas works like this: a letter arrives, but data from variables in it is not displayed. So it is empty. Can someone tell me what's wrong
$mails = array('@mail'); define('MAIL_SUBJECT', 'Тема'); $headers = array(); $headers[] = "MIME-Version: 1.0"; $headers[] = "Content-type: text/plain; charset=utf-8"; $headers[] = "X-Mailer: PHP/".phpversion(); (isset($_POST['name'])) ? $name = 'Имя клиента: ' . htmlspecialchars($_POST['name']) . "\n": $name = ''; (isset($_POST['phone'])) ? $phone = 'Телефон заказчика: ' . htmlspecialchars($_POST['phone']) . "\n": $phone = ''; (isset($_POST['email'])) ? $email = 'E-mail заказчика: ' . htmlspecialchars($_POST['email']) . "\n": $email = ''; (isset($_POST['from'])) ? $from = 'Форма: ' . htmlspecialchars($_POST['from']) . "\n": $from = ''; $result = true; foreach ($mails as $val) { if (!mail($val, MAIL_SUBJECT, $name . $phone . $email . $from, implode("\r\n", $headers))) { $result = false; break; } } if ($result) { header('Location: thanks.html'); exit; }