Multiple mails via bcc

Discussion in 'PHP' started by tarun1979, Jan 4, 2006.

  1. #1
    Hi,
    I am trying to send 10-15 mails in one shot. But couldn’t find some thing gr8.
    There will be one default mail to webmaster [$to] and bcc will be from the FORM.
    Please guide

    tarun bansal
    http://www.licofindia.95mb.com
     
    tarun1979, Jan 4, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    T0PS3O, Jan 4, 2006 IP
  3. TMan

    TMan Peon

    Messages:
    126
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You'll want something like:

    <?php
    $to = 'nobody@example.com';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: ' . "\r\n" .
    'Reply-To: ' . "\r\n" .
    'X-Mailer: PHP/' . phpversion(); . "\r\n" .
    'Bcc: ; ; ';

    mail($to, $subject, $message, $headers);
    ?>
     
    TMan, Jan 4, 2006 IP
  4. legend2

    legend2 Well-Known Member

    Messages:
    1,537
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    115
    #4
    TMan 's code is good. but if you don't want the hassle of headers, simply use the mail() with all the BCC being in the to field separated by commas.
     
    legend2, Jan 6, 2006 IP
  5. tarun1979

    tarun1979 Peon

    Messages:
    198
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I want to make it more clear
    i have a form say form.html with one field that inputs 10-15 mails seprated by ";"

    now i want to send bcc to these e-mails.
     
    tarun1979, Jan 7, 2006 IP