Re: [PHP] mail() Bcc:

2003-03-25 Thread David T-G
John, et al --

One more nit to add to this...

...and then CPT John W. Holmes said...
% 
...
% 
% You can do it like this:
% 
% $headers = From: [EMAIL PROTECTED]: [EMAIL PROTECTED]:
% [EMAIL PROTECTED];

Yes, figuring that the added line break is just because of a dumb mail
program :-0


% 
% or
% 
% $headers = From: [EMAIL PROTECTED]
% CC: [EMAIL PROTECTED]
% BCC: [EMAIL PROTECTED];

This can get you into trouble because it isn't portable.  Mail headers
are supposed to end in return (\r) *and* newline (\n) but all you're
doing here is saying to insert the end-of-line sequence for this
operating system.  If you're on a windows box you're fine (though you
have a myriad of other problems ;-) but if you're on a *NIX box you're
only sending newline and if you're on a Mac you're only sending return (I
don't know enough Mac to know if an OS X Mac has newlines like a classic
Mac or like a *NIX box).

Use the all-run-together format or a .= buildup and manually specify the
needed \r\n to avoid the headache.


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] mail() Bcc:

2003-03-24 Thread Bryan Brannigan
$mail-BCC( [EMAIL PROTECTED] );

- Original Message - 
From: Oden Odenius [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 3:44 PM
Subject: [PHP] mail() Bcc:


How can send bcc: with mail()?



--
Programmers are tools for convert coffeine into code... (c) Oden




_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() Bcc:

2003-03-24 Thread Kevin Stone

- Original Message -
From: Oden Odenius [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 1:44 PM
Subject: [PHP] mail() Bcc:


 How can send bcc: with mail()?



 --
 Programmers are tools for convert coffeine into code... (c) Oden

From, CC and BCC are headers to be set in the fourth parameter of the mail()
function.  Headers must be spearated by end-of-line characters.

$headers = From: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
BCC: [EMAIL PROTECTED];

mail($to, $subject, $body, $headers);

There are many other headers that you may find useful that are just as easy
to add through the mail() function.

HTH,
Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() Bcc:

2003-03-24 Thread Leif K-Brooks
Not everyone has whatever class you seem to be using...

Bryan Brannigan wrote:

$mail-BCC( [EMAIL PROTECTED] );

- Original Message - 
From: Oden Odenius [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 3:44 PM
Subject: [PHP] mail() Bcc:

How can send bcc: with mail()?



--
Programmers are tools for convert coffeine into code... (c) Oden


_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mail() Bcc:

2003-03-24 Thread CPT John W. Holmes
 From: Oden Odenius [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 3:44 PM
 Subject: [PHP] mail() Bcc:

 How can send bcc: with mail()?

 - Original Message -
 From: Bryan Brannigan [EMAIL PROTECTED]
 To: Oden Odenius [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 3:56 PM
 Subject: Re: [PHP] mail() Bcc:
 $mail-BCC( [EMAIL PROTECTED] );

Honestly, how do you expect that to help anyone? Do you assume the entire
world is using whatever class you are using? They are not.

At least tell them what class you're using as a recommendation, otherwise
provide an answer that'll work with a regular PHP function.

Thank you.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() Bcc:

2003-03-24 Thread CPT John W. Holmes
  How can send bcc: with mail()?
 
 From, CC and BCC are headers to be set in the fourth parameter of the
mail()
 function.  Headers must be spearated by end-of-line characters.

 $headers = From: [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 BCC: [EMAIL PROTECTED];

 mail($to, $subject, $body, $headers);

 There are many other headers that you may find useful that are just as
easy
 to add through the mail() function.

I don't think that'll work. The concept is right, but the way you are typing
it, you're actually adding in two line breaks between each header. That's
going to cause your CC: and BCC: header to show up in the body of the
message because anything after two consecutive line breaks is considered the
body.

You can do it like this:

$headers = From: [EMAIL PROTECTED]: [EMAIL PROTECTED]:
[EMAIL PROTECTED];

or

$headers = From: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
BCC: [EMAIL PROTECTED];

Also, you may want to check the regs on the capitalization of the headers.
If I'm wrong, someone please let me know, but some servers may only accept
Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that matters? If
it does, is it only dependant upon the sending SMTP server and not any
servers the message is sent through or the receiving server?

Thanks.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() Bcc:

2003-03-24 Thread Kevin Stone

- Original Message -
From: CPT John W. Holmes [EMAIL PROTECTED]
To: Kevin Stone [EMAIL PROTECTED]; Oden Odenius
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 3:51 PM
Subject: Re: [PHP] mail() Bcc:


   How can send bcc: with mail()?
  
  From, CC and BCC are headers to be set in the fourth parameter of the
 mail()
  function.  Headers must be spearated by end-of-line characters.
 
  $headers = From: [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  BCC: [EMAIL PROTECTED];
 
  mail($to, $subject, $body, $headers);
 
  There are many other headers that you may find useful that are just as
 easy
  to add through the mail() function.

 I don't think that'll work. The concept is right, but the way you are
typing
 it, you're actually adding in two line breaks between each header. That's
 going to cause your CC: and BCC: header to show up in the body of the
 message because anything after two consecutive line breaks is considered
the
 body.

 You can do it like this:

 $headers = From: [EMAIL PROTECTED]: [EMAIL PROTECTED]:
 [EMAIL PROTECTED];

 or

 $headers = From: [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 BCC: [EMAIL PROTECTED];

 Also, you may want to check the regs on the capitalization of the headers.
 If I'm wrong, someone please let me know, but some servers may only accept
 Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that matters?
If
 it does, is it only dependant upon the sending SMTP server and not any
 servers the message is sent through or the receiving server?

 Thanks.

 ---John Holmes...

\r\n should be used (esspecially in email!) to be compatible with all
operating systems.  However there were mistakes in my example.  Notedly the
string I supplied would break the header with superfulous \n end-of-line
characters.  The safe syntax would be..

$headers = From: [EMAIL PROTECTED];
$headers .= CC: [EMAIL PROTECTED];
$headers .= BCC: [EMAIL PROTECTED];

In one continuous line.  I do believe headers are case insensitive.

HTH,
Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() Bcc:

2003-03-24 Thread Kevin Stone

- Original Message -
From: Kevin Stone [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 24, 2003 4:17 PM
Subject: Re: [PHP] mail() Bcc:



 - Original Message -
 From: CPT John W. Holmes [EMAIL PROTECTED]
 To: Kevin Stone [EMAIL PROTECTED]; Oden Odenius
 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, March 24, 2003 3:51 PM
 Subject: Re: [PHP] mail() Bcc:


How can send bcc: with mail()?
   
   From, CC and BCC are headers to be set in the fourth parameter of the
  mail()
   function.  Headers must be spearated by end-of-line characters.
  
   $headers = From: [EMAIL PROTECTED]
   CC: [EMAIL PROTECTED]
   BCC: [EMAIL PROTECTED];
  
   mail($to, $subject, $body, $headers);
  
   There are many other headers that you may find useful that are just as
  easy
   to add through the mail() function.
 
  I don't think that'll work. The concept is right, but the way you are
 typing
  it, you're actually adding in two line breaks between each header.
That's
  going to cause your CC: and BCC: header to show up in the body of the
  message because anything after two consecutive line breaks is considered
 the
  body.
 
  You can do it like this:
 
  $headers = From: [EMAIL PROTECTED]: [EMAIL PROTECTED]:
  [EMAIL PROTECTED];
 
  or
 
  $headers = From: [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  BCC: [EMAIL PROTECTED];
 
  Also, you may want to check the regs on the capitalization of the
headers.
  If I'm wrong, someone please let me know, but some servers may only
accept
  Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that
matters?
 If
  it does, is it only dependant upon the sending SMTP server and not any
  servers the message is sent through or the receiving server?
 
  Thanks.
 
  ---John Holmes...

 \r\n should be used (esspecially in email!) to be compatible with all
 operating systems.  However there were mistakes in my example.  Notedly
the
 string I supplied would break the header with superfulous \n end-of-line
 characters.  The safe syntax would be..

 $headers = From: [EMAIL PROTECTED];
 $headers .= CC: [EMAIL PROTECTED];
 $headers .= BCC: [EMAIL PROTECTED];

 In one continuous line.  I do believe headers are case insensitive.

 HTH,
 Kevin

Sorry John I wrote before I read.  I misunderstood what you were correcting
me about.  I  see now that you nailed my mistake.
- Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() Bcc:

2003-03-24 Thread Ernest E Vogelsinger
At 23:51 24.03.2003, CPT John W. Holmes said:
[snip]
If I'm wrong, someone please let me know, but some servers may only accept
Bcc: instead of bcc: or BCC:, etc... ?? Does anyone know if that matters? If
it does, is it only dependant upon the sending SMTP server and not any
servers the message is sent through or the receiving server?
[snip] 

AFAIK the Bcc: address list is never found in the MIME headers at it is a
list of _blind_ addresses - i.e. addresses that do _not_ show up in the
messages, but whom the
mail is delvered to as well. They do show up in the SMTP envelope, as RCPT
TO: addresses during SMTP conversation.

This is an example of how such a conversation could look like:

S: 220 mail.mydomain.com; ESMTP Tue, Mar 25 2003, 00:49:12
C: HELO bluebear.mydomain.com
S: 250 mail.mydomain.com Hello bluebear.mydomain.com Pleased to meet you
C: MAIL FROM: [EMAIL PROTECTED]
S: 250 2.1.0 [EMAIL PROTECTED] Sender ok
C: RCPT TO: [EMAIL PROTECTED]
S: 250 2.1.5 [EMAIL PROTECTED] Recipient ok
C: RCPT TO: [EMAIL PROTECTED]
S: 250 2.1.5 [EMAIL PROTECTED] Recipient ok
C: DATA
S: 354 Enter mail, end with . on a line by itself
C: From: [EMAIL PROTECTED]
C: To: [EMAIL PROTECTED]
C: Subject: Test message
C:
C: Dear Saundra, this is only a test, please disregard.
C: .
S: 250 2.0.0 h2ONqQm26855 Message accepted for delivery
C: QUIT
S: 221 2.0.0 mail.mydomain.com closing connection

You see the main recipient is listed in the MIME header (To:), but the
Bcc recipient ([EMAIL PROTECTED]) is not; it only shows up during the SMTP
conversation (the envelope part).

AFAIK it's a feature of the mail client; be it an email program or a mailer
class.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Mail (), BCC: recipients not receiving my Newsletter

2003-02-27 Thread Ricardo Fitzgerald
It's not working either ...

Rick

Off Price Closeouts
1700 W 8 Ave
Miami, FL 33010
(305) 888 2555
FAX (305) 884 1761


-Mensaje original-
De: Jason k Larson [mailto:[EMAIL PROTECTED] 
Enviado el: Wednesday, February 26, 2003 5:59 PM
Para: Ricardo Fitzgerald
CC: [EMAIL PROTECTED]
Asunto: Re: [PHP] Mail (), BBC: recipients not receiving my Newsletter

What about using a ';' semicolon seperated list.

Ricardo Fitzgerald wrote:
 Hi to all,
 
 I wrote a small form which dumps data to a php script that uses mail
()
 to send an html newsletter, so far is working except
 that it's not sending to BCC: headers, in my form I have a field to
 enter a comma delimited email list, after submiting the form this list
 is stored under one variable $emaillist, and in my php script I used
 $headers .= Bcc: .$emaillist.\r\n;
 
 then I call 
 
 mail($to, $subject, $message, $headers);
 
 I don't receive an error message but my email list is not being sent,
 what I'm doing wrong ?
 
 Rick Fitzgerald
 
 Off Price Closeouts
 1700 W 8 Ave
 Miami, FL 33010
 (305) 888 2555
 FAX (305) 884 1761
 
 
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Chadwick, Russell


Try a newline at the end of $headers

-Original Message-
From: Marcus James Christian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Mail Bcc to a $variable?


Hello,

Ok I've got a script going to  a Bcc but can't seem to get it to work
when it's like this?

?php
include(mailinglist.inc);
$recipients = mailinglist.inc;
$headers = From: Me [EMAIL PROTECTED]\nBCC:$recipients;

include(password.inc);
if($mailusername == $username  $mailpassword == $password);
{
mail($to, $subject, $bodytext, $headers);
};

?


So how do I get mail to Bcc a variable like $recipients?   Recipients
being a huge text file of hundreds of email addy's.

-Marcus

--
Marcus James Christian - UNLIMITED -
Multimedia Internet Design
http://mjchristianunlimited.com

Proudly presents the music of CHROMATICUS
at http://chromaticus.com
and http://artists.mp3s.com/artists/275/chromaticus.html



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Marcus James Christian

Like  this...

$headers = From: Me [EMAIL PROTECTED]\nBCC:$recipients\n;

Or somewhere else?

Thanks,
Marcus

Russell Chadwick wrote:

 Try a newline at the end of $headers

 -Original Message-
 From: Marcus James Christian [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 11, 2001 10:15 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Mail Bcc to a $variable?

 Hello,

 Ok I've got a script going to  a Bcc but can't seem to get it to work
 when it's like this?

 ?php
 include(mailinglist.inc);
 $recipients = mailinglist.inc;
 $headers = From: Me [EMAIL PROTECTED]\nBCC:$recipients;

 include(password.inc);
 if($mailusername == $username  $mailpassword == $password);
 {
 mail($to, $subject, $bodytext, $headers);
 };

 ?

 So how do I get mail to Bcc a variable like $recipients?   Recipients
 being a huge text file of hundreds of email addy's.

 -Marcus

 --
 Marcus James Christian - UNLIMITED -
 Multimedia Internet Design
 http://mjchristianunlimited.com

 Proudly presents the music of CHROMATICUS
 at http://chromaticus.com
 and http://artists.mp3s.com/artists/275/chromaticus.html

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Marcus James Christian - UNLIMITED -
Multimedia Internet Design
http://mjchristianunlimited.com

Proudly presents the music of CHROMATICUS
at http://chromaticus.com
and http://artists.mp3s.com/artists/275/chromaticus.html



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Matthew Loff


Ahh!  I forgot to meantion the \n at the end of the headers in my
original post...


-Original Message-
From: Marcus James Christian [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 11, 2001 1:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Mail Bcc to a $variable?


Like  this...

$headers = From: Me [EMAIL PROTECTED]\nBCC:$recipients\n;

Or somewhere else?

Thanks,
Marcus

Russell Chadwick wrote:

 Try a newline at the end of $headers

 -Original Message-
 From: Marcus James Christian [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 11, 2001 10:15 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Mail Bcc to a $variable?

 Hello,

 Ok I've got a script going to  a Bcc but can't seem to get it to work 
 when it's like this?

 ?php
 include(mailinglist.inc);
 $recipients = mailinglist.inc;
 $headers = From: Me [EMAIL PROTECTED]\nBCC:$recipients;

 include(password.inc);
 if($mailusername == $username  $mailpassword == $password); {
 mail($to, $subject, $bodytext, $headers);
 };

 ?

 So how do I get mail to Bcc a variable like $recipients?   Recipients
 being a huge text file of hundreds of email addy's.

 -Marcus

 --
 Marcus James Christian - UNLIMITED -
 Multimedia Internet Design
 http://mjchristianunlimited.com

 Proudly presents the music of CHROMATICUS
 at http://chromaticus.com
 and http://artists.mp3s.com/artists/275/chromaticus.html

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To 
 contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Marcus James Christian - UNLIMITED -
Multimedia Internet Design
http://mjchristianunlimited.com

Proudly presents the music of CHROMATICUS
at http://chromaticus.com
and http://artists.mp3s.com/artists/275/chromaticus.html



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Reuben D Budiardja

your $recipients only containt the string mailinglist.inc, it does not 
contain the e-mail addresses, so the bcc is sent to the mailinglist.inc, 
which is a non-existent address.

Basically, your header should looks like:
From:[EMAIL PROTECTED]\nBcc:[EMAIL PROTECTED],[EMAIL PROTECTED]\n
etc.

echo your header in PRE to see it if you miss any new line, etc.

Reuben D. Budiardja

On Wednesday 11 July 2001 12:15 pm, Marcus James Christian wrote:
 Hello,

 Ok I've got a script going to  a Bcc but can't seem to get it to work
 when it's like this?

 ?php
 include(mailinglist.inc);
 $recipients = mailinglist.inc;
 $headers = From: Me [EMAIL PROTECTED]\nBCC:$recipients;

 include(password.inc);
 if($mailusername == $username  $mailpassword == $password);
 {
 mail($to, $subject, $bodytext, $headers);
 };

 ?


 So how do I get mail to Bcc a variable like $recipients?   Recipients
 being a huge text file of hundreds of email addy's.

 -Marcus

 --
 Marcus James Christian - UNLIMITED -
 Multimedia Internet Design
 http://mjchristianunlimited.com

 Proudly presents the music of CHROMATICUS
 at http://chromaticus.com
 and http://artists.mp3s.com/artists/275/chromaticus.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Lasse


Reuben D Budiardja [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 your $recipients only containt the string mailinglist.inc, it does not
 contain the e-mail addresses, so the bcc is sent to the mailinglist.inc,
 which is a non-existent address.

DOH! Missed that one... :-)

--
Lasse




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]