Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8785043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:15:08+00:00 2026-06-13T21:15:08+00:00

I am trying to figure out why the bcc part of this PHP mail

  • 0

I am trying to figure out why the bcc part of this PHP mail function is not working in the code below:

function _send_user_email($to, $subject, $message) {
$headers   = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/html; charset=iso-8859-1";
$headers[] = "From: Customer Service <support@mydomain.com>";
$headers[] = "Bcc: <support@mydomain.com>";
$headers[] = "X-Mailer: PHP/".phpversion();

mail($to, $subject, $message, implode("\r\n", $headers));
}

I wouldn’t think that there should be any problem specifying a bcc email address that is the same as the From address, but I’m not sure.

When I test this function, the recipient receives the message, but the BCC copy does not come through. Any idea why? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:15:09+00:00Added an answer on June 13, 2026 at 9:15 pm

    Seriously, don’t use the mail() function — you’re just letting yourself into a world of hurt.

    If you want to do anything beyond absolutely the most basic email, I strongly recommend using a decent mail class, such as phpMailer.

    It will make things much easier. No more messing around building the headers yourself, or trying to get the mime types working. Sending to multiple addresses, CC and BCC addresses becomes simple, and adding attachments goes from virtually impossible with mail() to dead simple.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In trying to figure out whether or not my code's inner loop is hitting
Trying to figure out why my code isn't working. Basically I have an elseif
Trying to figure out this MKPolygon working. I've created a whole heap MKMapPoints and
Trying to figure out what the & does in the below code? .controls-container {
Trying to figure out how I can do this properly. The print_r looks like
trying to figure out why this is happening - I have an input text
Trying to figure out how to type (via events not set the value) on
Trying to figure out a way to throw out attributes in this data that
Trying to figure out what I'm doing wrong when trying to put $(this) in
Trying to figure out how to use haml link_to with Ruby code in order

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.