Answer the question
In order to leave comments, you need to log in
How to set PHPMailer to display the page title in the email header?
Good evening! The email settings themselves are as follows
$mail->isHTML(true);
$mail->Subject = “Новая заявка на консультацию”; // Заголовок письма
$mail->Body = “Имя $name . Телефон $phone . Почта $email”; // Текст письма
// Результат
if(!$mail->send()) {
echo ‘Message could not be sent.’;
echo ‘Mailer Error: ‘ . $mail->ErrorInfo;
} else {
echo ‘ok’;
}
Answer the question
In order to leave comments, you need to log in
<form>
<input type="hidden" name="page" value="Главная страница">
<...>
</form>
...
$mail->Subject = “Новая заявка на консультацию: ” . $_POST['page']; // Заголовок письма
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question