A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: BCC in php

  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    66

    Post

    Just ripped this code outtof Whispers topic:

    Code:
    <?php
    $Subject = "Form Inquiry"; 
    $MailTo = "whispers007@hotmail.com"; 
    $Body = "From: $name\nE-mail: $MailFrom\n\nQuestions/Comments: $message\n"; 
    $From = "From: DMStudios_Support <$MailFrom>";
     
    mail($MailTo, "$Subject", "$Body", "$From"); 
    ?>
    I got something similar, but want to add a blind carbon copy, is it possible in php, and whats the code for it?

    tnx.

  2. #2
    Junior Member
    Join Date
    May 2002
    Posts
    20
    Hi!

    It's possible to send BCC with PHP. You have to define it in the mail header. Visit www.php.net/manual/en/function.mail.php to learn how to use this feature.

    Tensile

    PS: There was a bug in PHP: The BCC address was included in the mail header. I don't know if this bug was fixed in the latest release.

  3. #3
    Member
    Join Date
    Jan 2001
    Posts
    66
    fixed it in another way, made flash call two script with 2 seperate emailadresses. may not be fancy, but it works fine

  4. #4
    they call me the_jump... le_saut's Avatar
    Join Date
    Mar 2001
    Posts
    536
    Code:
    <?php
    $Subject = "Form Inquiry"; 
    $MailTo = "whispers007@hotmail.com"; 
    $Body = "From: $name\r\nE-mail: $MailFrom\r\nQuestions/Comments: $message\n"; 
    $From = "From: DMStudios_Support <$MailFrom>";
    $BCC = "BCC: John <another@domain.com>";
    $CC = "CC: CarbonDude <carboncopy@domain.com>";
    //mail it. 
    mail($MailTo, "$Subject", "$Body", "$From\n$BCC\n$CC"); 
    ?>

    You must use CC or cc not Cc, same with BCC,bcc, not Bcc.
    The \n newlines help PHP to separate the code out.
    The bug with BCC was with the Windows server implementation, not the *nix version, of PHP.


    cheers

    James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center