|
Posted by g0c on 09/26/06 11:56
"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,
>> 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/
>
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
Navigation:
[Reply to this message]
|