Форма PHP — скрытая почта не отправляется из формы электронной почты

привет, вот мой php-код для отправки электронного письма, когда письмо отправлено, адрес в разделе скрытой копии не получает письмо:

<?php
$to = "abc@abc.com";
$subject  = 'Form Submited To ABC Website';
$headers = "From: online@abc.com \r\n";
$headers .= "Bcc: info@abc.com \r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
?>

письма не являются почтой по конфиденциальным причинам

1

Решение

Синтаксис PHP mail ():

bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

Найдите ниже код для большего понимания.

<?php
// multiple recipients
$to  = 'aidan@example.com' . ', '; // note the comma, if you have multiple or else no comma.
$to .= 'wez@example.com';

// subject
$subject = 'Hello';

// message
$message = '<html><body><h2>Testing MSG</h2></body>';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Jiten <Jiten@example.com>, Kelly <hi@example.com>' . "\r\n";
$headers .= 'From: from_name <from_name@example.com>' . "\r\n";
$headers .= 'Cc: cc_email@example.com' . "\r\n";
$headers .= 'Bcc: bcc@example.com' . "\r\n";

// Mail it
mail($to, $subject, $message, $headers);
0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector