[英]Add bcc PHP mail function
Currently this is how the headers look like.目前这是标题的样子。 What should I do if I want to add a bcc.
如果我想添加密件抄送怎么办。 Thanks for the help.
谢谢您的帮助。 Below is what the code looks like.
下面是代码的样子。
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
This is how my Mail function looks, with Bcc and cc这是我的邮件功能的外观,带有密件抄送和抄送
//Send email
Mail::send('emails.contactus',
array(
'name' => $request->get('fname'),
'designation' => $request->get('jobtitle'),
'orgn' => $request->get('orgn'),
'phone' => request('countrycode')
),
function($message) use ($request)
{
$message->from('hello@xxxx.com','Name');
$message->to('support@xxx.com', 'Name')->subject('New Enquiry from Website');
$message->cc('rajiv@xxx.me');
$message->Bcc('rajiv@xxx.me');
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.