473,395 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

hiding / replace To: email addresses ...

g0c
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 = "em****@dot.com, em***@dot.com, em****@dot.com"

$header .= "To : em***@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: em***@notset.com\r\n";
$header .= "X-Sender: em***@notset.com\r\n";
$header .= "From: em***@notset.com>\r\n";
$header .= "Reply-To: em***@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
Sep 25 '06 #1
3 2845
"g0c" <RE*******@msn.comwrote in message
news:ef**********@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 = "em****@dot.com, em***@dot.com, em****@dot.com"

$header .= "To : em***@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: em***@notset.com\r\n";
$header .= "X-Sender: em***@notset.com\r\n";
$header .= "From: em***@notset.com>\r\n";
$header .= "Reply-To: em***@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/
Sep 26 '06 #2
g0c
"Ron Barnett" <ro*@RJBarnett.co.ukwrote in message
news:4518fd8d.0@entanet...
"g0c" <RE*******@msn.comwrote in message
news:ef**********@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 = "em****@dot.com, em***@dot.com, em****@dot.com"

$header .= "To : em***@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: em***@notset.com\r\n";
$header .= "X-Sender: em***@notset.com\r\n";
$header .= "From: em***@notset.com>\r\n";
$header .= "Reply-To: em***@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
Sep 26 '06 #3

"g0c" <RE*******@msn.comwrote in message
news:ef***********@fegnews.vip.hr...
"Ron Barnett" <ro*@RJBarnett.co.ukwrote in message
news:4518fd8d.0@entanet...
>"g0c" <RE*******@msn.comwrote in message
news:ef**********@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 = "em****@dot.com, em***@dot.com, em****@dot.com"

$header .= "To : em***@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: em***@notset.com\r\n";
$header .= "X-Sender: em***@notset.com\r\n";
$header .= "From: em***@notset.com>\r\n";
$header .= "Reply-To: em***@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
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 Bl*************@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
Sep 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Nel | last post by:
Before I try and reinvent the wheel, can anyone help me with a basic routine to hide email addresses from harvesting. I currently use pull my page content from a db and run this ereg_replace:...
19
by: Westcoast Sheri | last post by:
To keep track of how many fruits my visitors buy, I use a mySQL database (2 columns: "fruit" and "quantity")....so can we make these following mySQL queries work somehow? (visitor buys 5...
16
by: KHaled | last post by:
Greetings all.. I would like to hide my javascript code from "view source code" option in browsers. Is there a way of protecting the code ? TIA, KH.
117
by: Steevo | last post by:
Any suggestions as to the best programs for cloaking email addresses? Many thanks -- Steevo
4
by: web_design | last post by:
I put this together from some other scripts I am using on a site. I'm trying to make a better email hiding script. It isn't working. Also, it causes Internet Explorer 6 SP2 to block the script...
3
by: me | last post by:
Is there code out there to truly hide email addresses from view source or spiders(crawlers etc). TIA Aaron
2
by: subramanian100in | last post by:
Is my following understanding correct ? Data abstraction means providing the interface - that is, the set of functions that can be called by the user of a class. Information hiding means...
103
by: chochote | last post by:
Hi, I have a PHP script that does some processing, and stores an error message as a variable. The script then redirects to another script with the error string in the URL, with the second script...
5
by: shapper | last post by:
Hello, I have a text as follows: "My email is something@something.xyz and I posted this @ 2 am" I need to replace the @ by (AT) bu only the ones that are in email addresses. All other @...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.