mail to bcc help please

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • fo

    mail to bcc help please

    Hi I want to add one other emailrecepient to my mail code and can't seem to
    get it wright. Could you please help. Here is the code
    is this lien correct <emerge@goldcoa strentals.com.a u>\nX-Mailer: PHP/" .
    phpversion());

    Many thanks
    FO
    --------------
    blah blah
    ...
    $user_id = mysql_insert_id ();
    // Let's mail the user!
    $subject = "Your Membership at NSSA!";
    $message = "Dear $first_name $last_name,

    Thank you for registering at our website, http://www.nssa.org.au !

    You are two steps away from logging in and accessing our exclusive members
    area.

    To activate your membership, please click here:
    http://www.nssa.org.au/auth/activate.php?id =$user_id&code= $db_password

    Once you activate your membership, you will be able to login with the
    following information:
    Username: $username
    Password: $random_passwor d

    Thanks!
    The Webmaster

    This is an automated response, please do not reply!";
    mail($user_emai l, $subject, $message, "From: NSSA Customer
    Service<emerge@ goldcoastrental s.com.au>\nX-Mailer: PHP/" . phpversion());
    echo "<center><f ont face=\"Arial\" size=\"2\" >New member's membership and
    activation information<br />has been e-mailed to their email address!
    <br /><br />
    Activation of membership will be processed by the new member. </font>";
    }
    ?>


  • Pedro Graca

    #2
    Re: mail to bcc help please

    fo wrote:[color=blue]
    > Hi I want to add one other emailrecepient to my mail code and can't seem to[/color]
    ....[color=blue]
    > <emerge@goldcoa strentals.com.a u>\nX-Mailer: PHP/" . phpversion());[/color]

    Headers should be separated by "\r\n";


    <?php
    $headers = array();
    $headers[] = 'From: "NSSA Customer Service" <emerge@goldcoa strentals.com.a u>';
    $headers[] = 'X-Mailer: PHP/' . phpversion();
    $headers[] = 'Bcc: <webmaster@gold coastrentals.co m.au>';

    // ...

    if (!mail($to, $sub, $body, implode("\r\n", $headers))) echo 'Error sending mail.';
    ?>


    --
    USENET would be a better place if everybody read: | to email me: use |
    http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
    http://www.netmeister.org/news/learn2quote2.html | header, textonly |
    http://www.expita.com/nomime.html | no attachments. |

    Comment

    • Anders K. Madsen

      #3
      Re: mail to bcc help please

      On 21 Jul 2004 09:41:45 GMT
      Pedro Graca <hexkid@hotpop. com> wrote:
      [color=blue]
      > fo wrote:[color=green]
      > > Hi I want to add one other emailrecepient to my mail code and can't
      > > seem to[/color]
      > ...[color=green]
      > > <emerge@goldcoa strentals.com.a u>\nX-Mailer: PHP/" . phpversion());[/color]
      >
      > Headers should be separated by "\r\n";
      >[/color]

      Actually '\n' should be enough, though I'm not sure... I've always used
      '\n'.

      Madsen

      --
      Anders K. Madsen --- http://lillesvin.linux.dk

      "There are 10 types of people in the world.
      Those who understand binary - and those who don't."

      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.2.4 (GNU/Linux)

      iD8DBQFA/u+BlNHJe/JASHcRAsGIAJwP0 uhYlXgz8jaEIMxx hjKEeWAWNgCdHiz G
      SAxilL1DZ5gNp/KhK0tyAWc=
      =sF6d
      -----END PGP SIGNATURE-----

      Comment

      • Pedro Graca

        #4
        Re: mail to bcc help please

        Anders K. Madsen wrote:[color=blue]
        > Pedro Graca <hexkid@hotpop. com> wrote:[color=green]
        >> Headers should be separated by "\r\n";[/color]
        >
        > Actually '\n' should be enough, though I'm not sure... I've always used
        > '\n'.[/color]



        See sections 2.3.7 (for the SMTP headers) and 4.1.1.4 (for the DATA part
        of the mail, which includes the 4th parameter in the mail() function
        used by PHP).


        --
        USENET would be a better place if everybody read: | to email me: use |
        http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
        http://www.netmeister.org/news/learn2quote2.html | header, textonly |
        http://www.expita.com/nomime.html | no attachments. |

        Comment

        • fo

          #5
          Re: mail to bcc help please

          Worked like a charm. many thanks Pedro !

          well done

          Thank you!!

          FO

          "Pedro Graca" <hexkid@hotpop. com> wrote in message
          news:slrncfseip .1od.hexkid@ID-203069.user.uni-berlin.de...[color=blue]
          > fo wrote:[color=green]
          > > Hi I want to add one other emailrecepient to my mail code and can't seem[/color][/color]
          to[color=blue]
          > ...[color=green]
          > > <emerge@goldcoa strentals.com.a u>\nX-Mailer: PHP/" . phpversion());[/color]
          >
          > Headers should be separated by "\r\n";
          >
          >
          > <?php
          > $headers = array();
          > $headers[] = 'From: "NSSA Customer Service"[/color]
          <emerge@goldcoa strentals.com.a u>';[color=blue]
          > $headers[] = 'X-Mailer: PHP/' . phpversion();
          > $headers[] = 'Bcc: <webmaster@gold coastrentals.co m.au>';
          >
          > // ...
          >
          > if (!mail($to, $sub, $body, implode("\r\n", $headers))) echo 'Error[/color]
          sending mail.';[color=blue]
          > ?>
          >
          >
          > --
          > USENET would be a better place if everybody read: | to email me: use |
          > http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
          > http://www.netmeister.org/news/learn2quote2.html | header, textonly |
          > http://www.expita.com/nomime.html | no attachments. |[/color]


          Comment

          Working...