2015-10-14 51 views
1

你好,这里是我的发送邮件,在邮件发送地址在BCC部分没有收到电子邮件的PHP代码:PHP表 - BCC邮件不是来自电子邮件的形式发送

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

的邮件是不RALS那些机密的原因

回答

0

PHP邮件()语法是:

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

查找波纹管代码更多的了解。

<?php 
// multiple recipients 
$to = '[email protected]' . ', '; // note the comma, if you have multiple or else no comma. 
$to .= '[email protected]'; 

// 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 <[email protected]>, Kelly <[email protected]>' . "\r\n"; 
$headers .= 'From: from_name <[email protected]>' . "\r\n"; 
$headers .= 'Cc: [email protected]' . "\r\n"; 
$headers .= 'Bcc: [email protected]' . "\r\n"; 

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