hiding / replace To: email addresses ...

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

    hiding / replace To: email addresses ...

    hi,
    how to hide or replace email addresses in php mail function
    with something like "group" so the email addresses to which email
    is sent are not visible ?

    i have :

    $subs = "email1@dot.com , emai2@dot.com, email3@dot.com"

    $header .= "To : email@notset.co m\r\n";
    $header .= "Cc :\r\n";
    $header .= "Bcc : $subs\r\n";
    $header .= "Content-Type: text/plain; charset=ISO-8859-1\r\n";
    $header .= "Return-Path: email@notset.co m\r\n";
    $header .= "X-Sender: email@notset.co m\r\n";
    $header .= "From: email@notset.co m>\r\n";
    $header .= "Reply-To: email@notset.co m";

    $mailsend = mail($subs, $subject, $msg, $header);

    and when i get email all addresses are shown in header To: field ...
    hmm,
    can i use Bcc: maybe ?

    thanks, and please help a newbie :-)

    regards,
    goc

    PS: real email address are changed of course


  • Ron Barnett

    #2
    Re: hiding / replace To: email addresses ...

    "g0c" <REMOVEg0c@msn. comwrote in message
    news:ef8asq$s4e $1@fegnews.vip. hr...
    hi,
    how to hide or replace email addresses in php mail function
    with something like "group" so the email addresses to which email
    is sent are not visible ?
    >
    i have :
    >
    $subs = "email1@dot.com , emai2@dot.com, email3@dot.com"
    >
    $header .= "To : email@notset.co m\r\n";
    $header .= "Cc :\r\n";
    $header .= "Bcc : $subs\r\n";
    $header .= "Content-Type: text/plain; charset=ISO-8859-1\r\n";
    $header .= "Return-Path: email@notset.co m\r\n";
    $header .= "X-Sender: email@notset.co m\r\n";
    $header .= "From: email@notset.co m>\r\n";
    $header .= "Reply-To: email@notset.co m";
    >
    $mailsend = mail($subs, $subject, $msg, $header);
    >
    and when i get email all addresses are shown in header To: field ...
    hmm,
    can i use Bcc: maybe ?
    >
    thanks, and please help a newbie :-)
    >
    regards,
    goc
    >
    PS: real email address are changed of course
    Hi gcc,

    You are on the right lines, Bcc is the thing to use and it does go in the
    header but if you look carefully at your code, yow will see you have also
    included the body of the bcc list ($subs), as the first parameter of mail()
    this is the To parameter and is always made visible in the mail message.

    remove the To: line from your header construction and put it as the first
    parameter to Mail() and you should be OK

    I do hope you aren't writing a spamming program !

    Cheers

    Ron

    for PHP classes try http://ronbarnett.users.phpclasses.org/


    Comment

    • g0c

      #3
      Re: hiding / replace To: email addresses ...

      "Ron Barnett" <ron@RJBarnett. co.ukwrote in message
      news:4518fd8d.0 @entanet...
      "g0c" <REMOVEg0c@msn. comwrote in message
      news:ef8asq$s4e $1@fegnews.vip. hr...
      >hi,
      >how to hide or replace email addresses in php mail function
      >with something like "group" so the email addresses to which email
      >is sent are not visible ?
      >>
      >i have :
      >>
      >$subs = "email1@dot.com , emai2@dot.com, email3@dot.com"
      >>
      >$header .= "To : email@notset.co m\r\n";
      >$header .= "Cc :\r\n";
      >$header .= "Bcc : $subs\r\n";
      >$header .= "Content-Type: text/plain; charset=ISO-8859-1\r\n";
      >$header .= "Return-Path: email@notset.co m\r\n";
      >$header .= "X-Sender: email@notset.co m\r\n";
      >$header .= "From: email@notset.co m>\r\n";
      >$header .= "Reply-To: email@notset.co m";
      >>
      >$mailsend = mail($subs, $subject, $msg, $header);
      >>
      >and when i get email all addresses are shown in header To: field ...
      >hmm,
      >can i use Bcc: maybe ?
      >>
      >thanks, and please help a newbie :-)
      >>
      >regards,
      >goc
      >>
      >PS: real email address are changed of course
      >
      Hi gcc,
      >
      You are on the right lines, Bcc is the thing to use and it does go in the
      header but if you look carefully at your code, yow will see you have also
      included the body of the bcc list ($subs), as the first parameter of
      mail() this is the To parameter and is always made visible in the mail
      message.
      >
      remove the To: line from your header construction and put it as the first
      parameter to Mail() and you should be OK
      >
      I do hope you aren't writing a spamming program !
      >
      Cheers
      >
      Ron
      >
      for PHP classes try http://ronbarnett.users.phpclasses.org/
      >
      LOL, no ... i'm not, just trying to make a small mailing list where users
      can add themself ...

      Q: you said "remove the To: line from your header construction and put it as
      the first
      parameter to Mail()"

      ok, i removed To: from header but i don't quite understand what to put
      as first parameter to mail ? can i put something like "my subscribers" ?
      or leave empty ?


      anyways ... thank you very much.
      peace,
      goc


      Comment

      • Ron Barnett

        #4
        Re: hiding / replace To: email addresses ...


        "g0c" <REMOVEg0c@msn. comwrote in message
        news:efb4gn$1d9 g$1@fegnews.vip .hr...
        "Ron Barnett" <ron@RJBarnett. co.ukwrote in message
        news:4518fd8d.0 @entanet...
        >"g0c" <REMOVEg0c@msn. comwrote in message
        >news:ef8asq$s4 e$1@fegnews.vip .hr...
        >>hi,
        >>how to hide or replace email addresses in php mail function
        >>with something like "group" so the email addresses to which email
        >>is sent are not visible ?
        >>>
        >>i have :
        >>>
        >>$subs = "email1@dot.com , emai2@dot.com, email3@dot.com"
        >>>
        >>$header .= "To : email@notset.co m\r\n";
        >>$header .= "Cc :\r\n";
        >>$header .= "Bcc : $subs\r\n";
        >>$header .= "Content-Type: text/plain; charset=ISO-8859-1\r\n";
        >>$header .= "Return-Path: email@notset.co m\r\n";
        >>$header .= "X-Sender: email@notset.co m\r\n";
        >>$header .= "From: email@notset.co m>\r\n";
        >>$header .= "Reply-To: email@notset.co m";
        >>>
        >>$mailsend = mail($subs, $subject, $msg, $header);
        >>>
        >>and when i get email all addresses are shown in header To: field ...
        >>hmm,
        >>can i use Bcc: maybe ?
        >>>
        >>thanks, and please help a newbie :-)
        >>>
        >>regards,
        >>goc
        >>>
        >>PS: real email address are changed of course
        >>
        >Hi gcc,
        >>
        >You are on the right lines, Bcc is the thing to use and it does go in the
        >header but if you look carefully at your code, yow will see you have also
        >included the body of the bcc list ($subs), as the first parameter of
        >mail() this is the To parameter and is always made visible in the mail
        >message.
        >>
        >remove the To: line from your header construction and put it as the first
        >parameter to Mail() and you should be OK
        >>
        >I do hope you aren't writing a spamming program !
        >>
        >Cheers
        >>
        >Ron
        >>
        >for PHP classes try http://ronbarnett.users.phpclasses.org/
        >>
        >
        LOL, no ... i'm not, just trying to make a small mailing list where users
        can add themself ...
        >
        Q: you said "remove the To: line from your header construction and put it
        as the first
        parameter to Mail()"
        >
        ok, i removed To: from header but i don't quite understand what to put
        as first parameter to mail ? can i put something like "my subscribers" ?
        or leave empty ?
        >
        >
        anyways ... thank you very much.
        peace,
        goc
        Hi,

        I normally put my own mail address as the To address, so I send the mail to
        myself, BCC to the list then I know that the server has sent the list and
        the recipients can reply if necessary. You can add a dummy address as the
        'to' as you suggest if you wish to.

        You can use the style 'Fred Bloggsfreddyboy @whatever.com' to have a
        'friendly name appear as well as the actual email address. this is only
        useful in the to, from and possibly CC lists.


        Cheers

        Ron


        Comment

        Working...