Home > Archive > PHP Programming > September 2006 > hiding / replace To: email addresses ...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
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.com\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.com\r\n";
$header .= "X-Sender: email@notset.com\r\n";
$header .= "From: email@notset.com>\r\n";
$header .= "Reply-To: email@notset.com";
$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 2006-09-26, 3:58 am |
| "g0c" <REMOVEg0c@msn.com> wrote 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.com\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.com\r\n";
> $header .= "X-Sender: email@notset.com\r\n";
> $header .= "From: email@notset.com>\r\n";
> $header .= "Reply-To: email@notset.com";
>
> $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/
| |
|
| "Ron Barnett" <ron@RJBarnett.co.uk> wrote in message
news:4518fd8d.0@entanet...
> "g0c" <REMOVEg0c@msn.com> wrote in message
> news:ef8asq$s4e$1@fegnews.vip.hr...
>
> 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
| |
| Ron Barnett 2006-09-26, 6:57 pm |
|
"g0c" <REMOVEg0c@msn.com> wrote in message
news:efb4gn$1d9g$1@fegnews.vip.hr...
> "Ron Barnett" <ron@RJBarnett.co.uk> wrote in message
> news:4518fd8d.0@entanet...
>
> 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
|
|
|
|
|