Re: [PHP-DEV] Bug #9859 Updated: mail() doesn't send cc or bcc as in the manual instructions

2001-05-23 Thread Boian Bonev

  then maybe close the related bug 10136...

or better reopen both, since this is a problem.

 
  although it would be better if win32 smtp code is made more consistent
and
  compatible with the unix sendmail one

 Making Cc and cc both work is a one-line fix. (Patch attached, but as I
 can not test this, I didn't commit). But while looking at the
 code, I see nothing about Bcc. Strange, or I'm i missing something?

sure but not. you do not check for cC and CC :) the best way is to use case
insesitive strstr (this shall not be so hard to code)

there is one more prob - looking for \r\n exact match. in case of \n
terminated input, this call returns NULL and logic goes to alloc deadly too
much ram.

about bcc - yes it is missing, but as far as i remember i have seen it
eighter in an older version of this code, or in another related code. it
must be processed exactly like cc.

b.


-- 
PHP Development 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-DEV] Bug #9859 Updated: mail() doesn't send cc or bcc as in the manual instructions

2001-05-21 Thread bbonev

ID: 9859
Updated by: bbonev
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Mail related
Operating system: 
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

see also bug #10136

the facts are: mail on win32 require \r\n newlines
also it is case sensitive on Cc: and Bcc: - it will not honour them if spelled any 
other way.

here is the offending code (located in win32/sendmail.c):

if (headers  (pos1 = strstr(headers, Cc:))) {
  pos2 = strstr(pos1, \r\n);
  tempMailTo = estrndup(pos1, pos2-pos1);
  token = strtok(tempMailTo, ,);

i do not have win32 build env setup so cannot fix this

Previous Comments:
---

[2001-05-21 05:06:18] [EMAIL PROTECTED]
I've corrected the Cc: and Bcc: problems in the mail() example, but I'm reclassifying 
this as a Mail Function problem.  Is it necessary for the win32 version of the mail() 
function to require that you use rn? 

If it is, I can add this information to the mail function docs.

---

[2001-03-20 02:42:22] [EMAIL PROTECTED]
script example:
-

?php
$returnvar=false;

$mailto=[EMAIL PROTECTED];
$mailsubject=cc test;
$mailmessage=message content;
$mailHeader=cc:[EMAIL PROTECTED];

$returnvar=mail($mailto,$mailsubject,$mailmessage,$mailHeader); 

?
html
body
the mail was sent?
?php
echo brreturnvar= $returnvarbr;
?
/body
/html
-
The above does not send the carbon copy.

The pdf manual says:
--

$headers .= cc:[EMAIL PROTECTED]; // CC to
$headers .= bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]; // BCCs to
/* and now mail it */
mail($recipient, $subject, $message, $headers);
---


That does not work since Win32 sendmail.c looks for case sensitve Cc:
sendmail.c also does not look for bcc:

Also you must have rn not just n.

I think the problem is here in win32 sendmail.c :

if (headers  (pos1 = strstr(headers, Cc:))) {
pos2 = strstr(pos1, rn);
tempMailTo = estrndup(pos1, pos2-pos1);



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9859edit=2


-- 
PHP Development 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-DEV] Bug #9859 Updated: mail() doesn't send cc or bcc as in the manual instructions

2001-05-21 Thread danbeck

ID: 9859
Updated by: danbeck
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Mail related
Operating system: 
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

If this is the case, then I'm closing this bug report and I will document the behavior 
under the mail function.

Previous Comments:
---

[2001-05-22 01:45:29] [EMAIL PROTECTED]
see also bug #10136

the facts are: mail on win32 require rn newlines
also it is case sensitive on Cc: and Bcc: - it will not honour them if spelled any 
other way.

here is the offending code (located in win32/sendmail.c):

if (headers  (pos1 = strstr(headers, Cc:))) {
  pos2 = strstr(pos1, rn);
  tempMailTo = estrndup(pos1, pos2-pos1);
  token = strtok(tempMailTo, ,);

i do not have win32 build env setup so cannot fix this

---

[2001-05-21 05:06:18] [EMAIL PROTECTED]
I've corrected the Cc: and Bcc: problems in the mail() example, but I'm reclassifying 
this as a Mail Function problem.  Is it necessary for the win32 version of the mail() 
function to require that you use rn? 

If it is, I can add this information to the mail function docs.

---

[2001-03-20 02:42:22] [EMAIL PROTECTED]
script example:
-

?php
$returnvar=false;

$mailto=[EMAIL PROTECTED];
$mailsubject=cc test;
$mailmessage=message content;
$mailHeader=cc:[EMAIL PROTECTED];

$returnvar=mail($mailto,$mailsubject,$mailmessage,$mailHeader); 

?
html
body
the mail was sent?
?php
echo brreturnvar= $returnvarbr;
?
/body
/html
-
The above does not send the carbon copy.

The pdf manual says:
--

$headers .= cc:[EMAIL PROTECTED]; // CC to
$headers .= bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]; // BCCs to
/* and now mail it */
mail($recipient, $subject, $message, $headers);
---


That does not work since Win32 sendmail.c looks for case sensitve Cc:
sendmail.c also does not look for bcc:

Also you must have rn not just n.

I think the problem is here in win32 sendmail.c :

if (headers  (pos1 = strstr(headers, Cc:))) {
pos2 = strstr(pos1, rn);
tempMailTo = estrndup(pos1, pos2-pos1);



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9859edit=2


-- 
PHP Development 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-DEV] Bug #9859 Updated: mail() doesn't send cc or bcc as in the manual instructions

2001-05-21 Thread Boian Bonev

hi,

then maybe close the related bug 10136...

although it would be better if win32 smtp code is made more consistent and
compatible with the unix sendmail one

b.


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 22, 2001 4:33 AM
Subject: [PHP-DEV] Bug #9859 Updated: mail() doesn't send cc or bcc as in
the manual instructions


 ID: 9859
 Updated by: danbeck
 Reported By: [EMAIL PROTECTED]
 Old-Status: Open
 Status: Closed
 Bug Type: Mail related
 Operating system:
 PHP Version: 4.0.4pl1
 Assigned To:
 Comments:

 If this is the case, then I'm closing this bug report and I will document
the behavior under the mail function.

 Previous Comments:
 --
-

 [2001-05-22 01:45:29] [EMAIL PROTECTED]
 see also bug #10136

 the facts are: mail on win32 require rn newlines
 also it is case sensitive on Cc: and Bcc: - it will not honour them if
spelled any other way.

 here is the offending code (located in win32/sendmail.c):

 if (headers  (pos1 = strstr(headers, Cc:))) {
   pos2 = strstr(pos1, rn);
   tempMailTo = estrndup(pos1, pos2-pos1);
   token = strtok(tempMailTo, ,);

 i do not have win32 build env setup so cannot fix this

 --
-

 [2001-05-21 05:06:18] [EMAIL PROTECTED]
 I've corrected the Cc: and Bcc: problems in the mail() example, but I'm
reclassifying this as a Mail Function problem.  Is it necessary for the
win32 version of the mail() function to require that you use rn?

 If it is, I can add this information to the mail function docs.

 --
-

 [2001-03-20 02:42:22] [EMAIL PROTECTED]
 script example:
 --
---
 ?php
 $returnvar=false;

 $mailto=[EMAIL PROTECTED];
 $mailsubject=cc test;
 $mailmessage=message content;
 $mailHeader=cc:[EMAIL PROTECTED];

 $returnvar=mail($mailto,$mailsubject,$mailmessage,$mailHeader);

 ?
 html
 body
 the mail was sent?
 ?php
 echo brreturnvar= $returnvarbr;
 ?
 /body
 /html
 --
---
 The above does not send the carbon copy.

 The pdf manual says:
 --

 $headers .= cc:[EMAIL PROTECTED]; // CC to
 $headers .= bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]; // BCCs
to
 /* and now mail it */
 mail($recipient, $subject, $message, $headers);
 --
-

 That does not work since Win32 sendmail.c looks for case sensitve Cc:
 sendmail.c also does not look for bcc:

 Also you must have rn not just n.

 I think the problem is here in win32 sendmail.c :

 if (headers  (pos1 = strstr(headers, Cc:))) {
 pos2 = strstr(pos1, rn);
 tempMailTo = estrndup(pos1, pos2-pos1);



 --
-



 ATTENTION! Do NOT reply to this email!
 To reply, use the web interface found at
http://bugs.php.net/?id=9859edit=2


 --
 PHP Development 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 Development 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-DEV] Bug #9859 Updated: mail() doesn't send cc or bcc as in the manual instructions

2001-05-20 Thread danbeck

ID: 9859
Updated by: danbeck
Reported By: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: Documentation problem
Bug Type: Mail related
Operating system: 
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

I've corrected the Cc: and Bcc: problems in the mail() example, but I'm reclassifying 
this as a Mail Function problem.  Is it necessary for the win32 version of the mail() 
function to require that you use \r\n? 

If it is, I can add this information to the mail function docs.

Previous Comments:
---

[2001-03-20 02:42:22] [EMAIL PROTECTED]
script example:
-

?php
$returnvar=false;

$mailto=[EMAIL PROTECTED];
$mailsubject=cc test;
$mailmessage=message content;
$mailHeader=cc:[EMAIL PROTECTED];

$returnvar=mail($mailto,$mailsubject,$mailmessage,$mailHeader); 

?
html
body
the mail was sent?
?php
echo brreturnvar= $returnvarbr;
?
/body
/html
-
The above does not send the carbon copy.

The pdf manual says:
--

$headers .= cc:[EMAIL PROTECTED]; // CC to
$headers .= bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]; // BCCs to
/* and now mail it */
mail($recipient, $subject, $message, $headers);
---


That does not work since Win32 sendmail.c looks for case sensitve Cc:
sendmail.c also does not look for bcc:

Also you must have rn not just n.

I think the problem is here in win32 sendmail.c :

if (headers  (pos1 = strstr(headers, Cc:))) {
pos2 = strstr(pos1, rn);
tempMailTo = estrndup(pos1, pos2-pos1);



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9859edit=2


-- 
PHP Development 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]