0

I am tring to sent email to multiplw users in Bcc through PHP mail scriptcode is as follows -

$recipients =array('recpient1@gmail.com','recpient2go@gmail.com');


$headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

        $to = '';
        $subject = "E-mail subject";
        $body = "E-mail body";
        $headers = 'From: info@mydomain.com' . "\r\n" ;
        $headers .= 'Reply-To: info@mydomain.com' . "\r\n";
        $headers .= 'BCC: ' . implode(', ', $recipients) . "\r\n";

        $email =mail($to, $subject, $body, $headers);

if we leave $to black then user in gmail detail shows "to undisclosed recipients" and Bcc not shows how can be show "Bcc me (user who got mail)" i search a lot, but didn't got any proper answer

Sirko
  • 72,589
  • 19
  • 149
  • 183
  • 2
    why do you need to show "Bcc me@my-email"? Since you received the email, it was of course sent to you! – Jocelyn Jul 24 '12 at 14:20
  • It's a bit hard to understand the question, but the BCC field is hidden by definition. If you want the recipients shown use the CC field. – JJJ Jul 24 '12 at 14:21
  • Sorry, i didn't understood your question. You want to show the Bcc emails?. You cannot do that, they're hidden from the users. – Lefsler Jul 24 '12 at 14:21

2 Answers2

0

BCC stands for Blind Carbon Copy and its main purpose is, that you can not see the other recipients of that mail.

If you want to show all email addresses use CC (Carbon Copy) instead.

Be aware, though, that all recipients now can see all other recipients' email addresses, which increases the probabilities having those email addresses end up in spam catalogs.

Sirko
  • 72,589
  • 19
  • 149
  • 183
0

You can't control how the people at Gmail decide to display the recipients list when reading an email. Each webmail system decides how they want to display the recipients list.

Maybe you can fin another webmail system that decided to display "Sent to me@my-email" instead of "Undisclosed recipients"...but why does it matter to you?
Why do you care about that? I'd say it is a false problem. Since you received the email, it was of course sent to you.

Jocelyn
  • 11,209
  • 10
  • 43
  • 60