I am using php mailer script for sending emails in my project. When i send mail with bcc using the below code
$mail->AddBCC([email protected])
The email received by [email protected] user but information content showed in the header of the email received doesn’t show BCC information as below.
Bcc: [email protected]
How can I achieve it. Thanks in advance.
Note that the BCC and To recipients are not specified in the "headers" field.
For example, mail("[email protected], [email protected]", SUBJECT, MESSAGE); To add CC and BCC in PHP mail, we have to manually set the “Cc” and “Bcc” fields in the mail headers. For example, mail(TO, SUBJECT, MESSAGE, "Cc: [email protected]\r\nBcc: [email protected]");
To send an email using the PHP mail feature, create a new PHP file in the public_html directory and input the mail() function. Then, execute the script using your web browser.
BCC information is automatically moved from BCC to RCPT field by the SMTP server. You will not see BCC fields in the recipient's mailbox.
You will find a good answer to a similar question here: https://stackoverflow.com/a/2750359/239599
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With