How to hide other recipients from txt file? In the field to whom, all recipients are displayed, you need to display only one.

index.php

<form action="send.php" method="get"> <input type="hidden" placeholder="Введите сюда e-mail" value="<?php include ("maillist.txt"); ?>" name="e-mail"> <input type="submit" id='mu_but' value="Нажмите, чтобы отправить письмо"> </form> 

send.php

 <?php //Получаем данные из глобальной переменной $_GET, так как мы передаем данные методом GET $email1 = $_GET['e-mail']; // Вытаскиваем почту в переменную $message = ' <p>Текст письма</p> </br> <p>1-ая строчка </p> </br> <b style="color: #ff4200;">2-ая строчка </b> </br> '; // Формируем сообщение, отправляемое на почту $to = "$email1"; // Задаем получателя письма $from = "support@bla.ru"; // От кого пришло письмо $subject = "Тема"; // Задаем тему письма $headers = "From: $from\r\nReply-To: $from\r\nContent-type: text/html; charset=utf-8\r\n"; if (mail($to, $subject, $message, $headers)) { // При помощи функции mail, отправляем сообщение, проверяя отправилось оно или нет echo "<p>Сообщение успешно отправлено</p>"; // Отправка успешна } else { echo "<p>Что-то пошло не так, как планировалось</p>"; // Письмо не отправилось } ?> 
  • Well, as it is ... wrote like normal .. but it was displayed .. yes, well, you - user239616
  • Send each recipient a separate letter. - Visman

0