#28038 [Opn]: Sent incorrect RCPT TO commands to SMTP server

2007-06-27 Thread sniper
 ID:   28038
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32
 PHP Version:  5CVS, 4CVS (2006-01-06) (cvs)
 New Comment:

It's propably not complicated to fix but there just isn't anyone with
enough interest to do it. Feel free to provide a patch and perhaps
someone might catch on it. Or pay someone serious cash to fix it..


Previous Comments:


[2007-02-23 14:24:43] business at ziu dot de

This bug is now open since THREE YEARS. And still the version of today
(5.2.1) can not talk to SMTP servers as it should do.
This can not be so complicated to fix.



[2006-04-14 11:55:21] [EMAIL PROTECTED]

See also bug #37073



[2006-01-06 03:17:07] [EMAIL PROTECTED]

The case reported in bug #35013 should be fixed now in CVS.
(the others are NOT!)




[2005-11-10 15:57:04] Ruben at e-builds dot com

The sames happens when using mail() with the 'From' part of the extra
headers.

php uses this Header From part (and others for RPath etc..) for the
MAIL FROM address in the SMTP protocol, at least if you didn't specify
the sendmail_from setting in php.ini.
But for one reason or another, php (I thínk it's php) wraps this part
in  and  again!

The workaround is not to use the special format -User [EMAIL PROTECTED]-,
but just the e-mail address [EMAIL PROTECTED].  Of course then php scripters
who like a professional approach and want to use this special format,
..well..they can't, at least not per php script.


I use a Domino SMTP server on Win32.
P.S. I saw several bugs of the same kind allover.  Some are even
wrongly closed, I presume.



[2005-11-02 00:05:27] php-louis at steelbytes dot com

can we at least just implement stripping of leading and trailing white
space on what is extracted from the headers? (as that'll fix 35013).



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/28038

-- 
Edit this bug report at http://bugs.php.net/?id=28038edit=1


#28038 [Opn]: Sent incorrect RCPT TO commands to SMTP server

2006-04-14 Thread sniper
 ID:   28038
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32
 PHP Version:  5CVS, 4CVS (2006-01-06) (cvs)
 New Comment:

See also bug #37073


Previous Comments:


[2006-01-06 03:17:07] [EMAIL PROTECTED]

The case reported in bug #35013 should be fixed now in CVS.
(the others are NOT!)




[2005-11-10 15:57:04] Ruben at e-builds dot com

The sames happens when using mail() with the 'From' part of the extra
headers.

php uses this Header From part (and others for RPath etc..) for the
MAIL FROM address in the SMTP protocol, at least if you didn't
specify the sendmail_from setting in php.ini.
But for one reason or another, php (I thínk it's php) wraps this part
in  and  again!

The workaround is not to use the special format -User [EMAIL PROTECTED]-,
but just the e-mail address [EMAIL PROTECTED].  Of course then php
scripters who like a professional approach and want to use this special
format, ..well..they can't, at least not per php script.


I use a Domino SMTP server on Win32.
P.S. I saw several bugs of the same kind allover.  Some are even
wrongly closed, I presume.



[2005-11-02 00:05:27] php-louis at steelbytes dot com

can we at least just implement stripping of leading and trailing white
space on what is extracted from the headers? (as that'll fix 35013).



[2005-11-01 11:37:04] [EMAIL PROTECTED]

See also bug #35013, one more way how headers are parsed wrong.



[2005-11-01 11:36:36] [EMAIL PROTECTED]

See also bug #32600 (rpath set wrong too)



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/28038

-- 
Edit this bug report at http://bugs.php.net/?id=28038edit=1


#28038 [Opn]: Sent incorrect RCPT TO commands to SMTP server

2006-01-05 Thread sniper
 ID:   28038
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32
 PHP Version:  5CVS, 4CVS (2006-01-06) (cvs)
 New Comment:

The case reported in bug #35013 should be fixed now in CVS.
(the others are NOT!)



Previous Comments:


[2005-11-10 15:57:04] Ruben at e-builds dot com

The sames happens when using mail() with the 'From' part of the extra
headers.

php uses this Header From part (and others for RPath etc..) for the
MAIL FROM address in the SMTP protocol, at least if you didn't
specify the sendmail_from setting in php.ini.
But for one reason or another, php (I thínk it's php) wraps this part
in  and  again!

The workaround is not to use the special format -User [EMAIL PROTECTED]-,
but just the e-mail address [EMAIL PROTECTED].  Of course then php
scripters who like a professional approach and want to use this special
format, ..well..they can't, at least not per php script.


I use a Domino SMTP server on Win32.
P.S. I saw several bugs of the same kind allover.  Some are even
wrongly closed, I presume.



[2005-11-02 00:05:27] php-louis at steelbytes dot com

can we at least just implement stripping of leading and trailing white
space on what is extracted from the headers? (as that'll fix 35013).



[2005-11-01 11:37:04] [EMAIL PROTECTED]

See also bug #35013, one more way how headers are parsed wrong.



[2005-11-01 11:36:36] [EMAIL PROTECTED]

See also bug #32600 (rpath set wrong too)



[2005-01-25 00:26:34] [EMAIL PROTECTED]

The above patch is wrong. Only acceptable form for RCPT TO:
is:

RCPT TO:[EMAIL PROTECTED] 

Notice the brackets. Do not confuse yourself with RFC2822..
It does not obsolete 2821 as it talks about different thing.

So the fix is to drop the outside brackets stuff out of the addresses.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/28038

-- 
Edit this bug report at http://bugs.php.net/?id=28038edit=1


#28038 [Opn]: Sent incorrect RCPT TO commands to SMTP server

2005-11-01 Thread sniper
 ID:   28038
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32
 PHP Version:  5CVS, 4CVS (2005-08-08)
 New Comment:

See also bug #35013, one more way how headers are parsed wrong.




Previous Comments:


[2005-08-08 00:14:40] [EMAIL PROTECTED]

See also: #32600 (rpath set wrong too)




[2005-01-25 00:26:34] [EMAIL PROTECTED]

The above patch is wrong. Only acceptable form for RCPT TO:
is:

RCPT TO:[EMAIL PROTECTED] 

Notice the brackets. Do not confuse yourself with RFC2822..
It does not obsolete 2821 as it talks about different thing.

So the fix is to drop the outside brackets stuff out of the addresses.




[2004-08-06 01:59:45] papercrane at reversefold dot com

Here's a possible patch for it. It's pretty simplistic, bit it should
work:

http://www.reversefold.com/sendmail.c.patch

Full file:

http://www.reversefold.com/sendmail.c

NOTE: I haven't actually *tested* this, it may not even compile. If it
doesn't, please send me a note and I'll try to fix it.



[2004-04-17 19:14:01] jordi at jcanals dot net

Description:

In windows, and using an SMTP server, when you try to send a mail using
the mail function the SMTP transaction will fail if you include
recipient names.

When including any recipient header in the following format (wich
follows the RFC 2822), the mail function does not handle it properly:

To: User Name [EMAIL PROTECTED]
Cc: Other User [EMAIL PROTECTED]
Bcc: Third User [EMAIL PROTECTED]

Loking at the SMTP transaction, the PHP mail layer sends this RCPT
commands wich do not folow the SMTP standard stated on RFC 2821:

RCPT TO:User Name [EMAIL PROTECTED]
RCPT TO:Other User [EMAIL PROTECTED]
RCPT TO:Third User [EMAIL PROTECTED]

Fails always with this environments:
Tested on Windows XP, Apache 2.0.49, PHP 4.3.6 (Also in 4.3.4)
Tested also on Windows 2000, IIS, PHP 4.3.6

Tested Using SMTP servers on Linux with Exim and Sendmail.
Tested also using the default Windows 2000 SMTP server.

Reproduce code:
---
// SAMPLE 1:

$to_recipient = User Name [EMAIL PROTECTED];
$header = Cc: Other User [EMAIL PROTECTED]\r\n;
$header .= Bcc: Third User [EMAIL PROTECTED]\r\n;
mail($to_recipient, $subject, $body, $header);

// FAILS with SMTP errors for all three recipients.

SAMPLE 2:
$to_recipient = [EMAIL PROTECTED];
$header = To: User Name [EMAIL PROTECTED]\r\n;
$header .= Cc: Other User [EMAIL PROTECTED]\r\n;
$header .= Bcc: Third User [EMAIL PROTECTED]\r\n;
mail($to_recipient, $subject, $body, $header);

FAILS on with SMTP error on the three recipients passed on the $header
field.

Expected result:

Expected that the mail layer exctracts only the mail address from
recipients to send the SMTP commands:

As seen on the RFC's 2821 and 2822, when sending a mail with the
recipient headers formed like above, it is expected the mail layer to
extract ONLY the email address to send the RCPT commands, and pass the
headers without any change in the DATA command during the SMTP
transaction. Example of the  correct SMTP transaction for the above
headers:

RCPT TO:[EMAIL PROTECTED]
RCPT TO:[EMAIL PROTECTED]
RCPT TO:[EMAIL PROTECTED]

DATA

To: User Name [EMAIL PROTECTED]
Cc: Other User [EMAIL PROTECTED]
Bcc: Third User [EMAIL PROTECTED]


Actual result:
--
You get that error for all recipients with the recipient name:

Warning: mail(): SMTP server response: 501 SomeOne Name
[EMAIL PROTECTED]: @ or . expected after SomeOne in
mail.class.php on line 333

This error is produced when the mail layer is sending a wrong formed
RCPT TO: command in the SMTP transaction.





-- 
Edit this bug report at http://bugs.php.net/?id=28038edit=1


#28038 [Opn]: Sent incorrect RCPT TO commands to SMTP server

2005-11-01 Thread sniper
 ID:   28038
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32
 PHP Version:  5CVS, 4CVS (2005-08-08)
 New Comment:

See also bug #32600 (rpath set wrong too)


Previous Comments:


[2005-11-01 11:36:18] [EMAIL PROTECTED]

See also bug #35013, one more way how headers are parsed wrong.





[2005-08-08 00:14:40] [EMAIL PROTECTED]

See also: #32600 (rpath set wrong too)




[2005-01-25 00:26:34] [EMAIL PROTECTED]

The above patch is wrong. Only acceptable form for RCPT TO:
is:

RCPT TO:[EMAIL PROTECTED] 

Notice the brackets. Do not confuse yourself with RFC2822..
It does not obsolete 2821 as it talks about different thing.

So the fix is to drop the outside brackets stuff out of the addresses.




[2004-08-06 01:59:45] papercrane at reversefold dot com

Here's a possible patch for it. It's pretty simplistic, bit it should
work:

http://www.reversefold.com/sendmail.c.patch

Full file:

http://www.reversefold.com/sendmail.c

NOTE: I haven't actually *tested* this, it may not even compile. If it
doesn't, please send me a note and I'll try to fix it.



[2004-04-17 19:14:01] jordi at jcanals dot net

Description:

In windows, and using an SMTP server, when you try to send a mail using
the mail function the SMTP transaction will fail if you include
recipient names.

When including any recipient header in the following format (wich
follows the RFC 2822), the mail function does not handle it properly:

To: User Name [EMAIL PROTECTED]
Cc: Other User [EMAIL PROTECTED]
Bcc: Third User [EMAIL PROTECTED]

Loking at the SMTP transaction, the PHP mail layer sends this RCPT
commands wich do not folow the SMTP standard stated on RFC 2821:

RCPT TO:User Name [EMAIL PROTECTED]
RCPT TO:Other User [EMAIL PROTECTED]
RCPT TO:Third User [EMAIL PROTECTED]

Fails always with this environments:
Tested on Windows XP, Apache 2.0.49, PHP 4.3.6 (Also in 4.3.4)
Tested also on Windows 2000, IIS, PHP 4.3.6

Tested Using SMTP servers on Linux with Exim and Sendmail.
Tested also using the default Windows 2000 SMTP server.

Reproduce code:
---
// SAMPLE 1:

$to_recipient = User Name [EMAIL PROTECTED];
$header = Cc: Other User [EMAIL PROTECTED]\r\n;
$header .= Bcc: Third User [EMAIL PROTECTED]\r\n;
mail($to_recipient, $subject, $body, $header);

// FAILS with SMTP errors for all three recipients.

SAMPLE 2:
$to_recipient = [EMAIL PROTECTED];
$header = To: User Name [EMAIL PROTECTED]\r\n;
$header .= Cc: Other User [EMAIL PROTECTED]\r\n;
$header .= Bcc: Third User [EMAIL PROTECTED]\r\n;
mail($to_recipient, $subject, $body, $header);

FAILS on with SMTP error on the three recipients passed on the $header
field.

Expected result:

Expected that the mail layer exctracts only the mail address from
recipients to send the SMTP commands:

As seen on the RFC's 2821 and 2822, when sending a mail with the
recipient headers formed like above, it is expected the mail layer to
extract ONLY the email address to send the RCPT commands, and pass the
headers without any change in the DATA command during the SMTP
transaction. Example of the  correct SMTP transaction for the above
headers:

RCPT TO:[EMAIL PROTECTED]
RCPT TO:[EMAIL PROTECTED]
RCPT TO:[EMAIL PROTECTED]

DATA

To: User Name [EMAIL PROTECTED]
Cc: Other User [EMAIL PROTECTED]
Bcc: Third User [EMAIL PROTECTED]


Actual result:
--
You get that error for all recipients with the recipient name:

Warning: mail(): SMTP server response: 501 SomeOne Name
[EMAIL PROTECTED]: @ or . expected after SomeOne in
mail.class.php on line 333

This error is produced when the mail layer is sending a wrong formed
RCPT TO: command in the SMTP transaction.





-- 
Edit this bug report at http://bugs.php.net/?id=28038edit=1


#28038 [Opn]: Sent incorrect RCPT TO commands to SMTP server

2005-11-01 Thread sniper
 ID:   28038
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32
 PHP Version:  5CVS, 4CVS (2005-08-08)
 New Comment:

See also bug #35013, one more way how headers are parsed wrong.


Previous Comments:


[2005-11-01 11:36:36] [EMAIL PROTECTED]

See also bug #32600 (rpath set wrong too)



[2005-11-01 11:36:18] [EMAIL PROTECTED]

See also bug #35013, one more way how headers are parsed wrong.





[2005-01-25 00:26:34] [EMAIL PROTECTED]

The above patch is wrong. Only acceptable form for RCPT TO:
is:

RCPT TO:[EMAIL PROTECTED] 

Notice the brackets. Do not confuse yourself with RFC2822..
It does not obsolete 2821 as it talks about different thing.

So the fix is to drop the outside brackets stuff out of the addresses.




[2004-08-06 01:59:45] papercrane at reversefold dot com

Here's a possible patch for it. It's pretty simplistic, bit it should
work:

http://www.reversefold.com/sendmail.c.patch

Full file:

http://www.reversefold.com/sendmail.c

NOTE: I haven't actually *tested* this, it may not even compile. If it
doesn't, please send me a note and I'll try to fix it.



[2004-04-17 19:14:01] jordi at jcanals dot net

Description:

In windows, and using an SMTP server, when you try to send a mail using
the mail function the SMTP transaction will fail if you include
recipient names.

When including any recipient header in the following format (wich
follows the RFC 2822), the mail function does not handle it properly:

To: User Name [EMAIL PROTECTED]
Cc: Other User [EMAIL PROTECTED]
Bcc: Third User [EMAIL PROTECTED]

Loking at the SMTP transaction, the PHP mail layer sends this RCPT
commands wich do not folow the SMTP standard stated on RFC 2821:

RCPT TO:User Name [EMAIL PROTECTED]
RCPT TO:Other User [EMAIL PROTECTED]
RCPT TO:Third User [EMAIL PROTECTED]

Fails always with this environments:
Tested on Windows XP, Apache 2.0.49, PHP 4.3.6 (Also in 4.3.4)
Tested also on Windows 2000, IIS, PHP 4.3.6

Tested Using SMTP servers on Linux with Exim and Sendmail.
Tested also using the default Windows 2000 SMTP server.

Reproduce code:
---
// SAMPLE 1:

$to_recipient = User Name [EMAIL PROTECTED];
$header = Cc: Other User [EMAIL PROTECTED]\r\n;
$header .= Bcc: Third User [EMAIL PROTECTED]\r\n;
mail($to_recipient, $subject, $body, $header);

// FAILS with SMTP errors for all three recipients.

SAMPLE 2:
$to_recipient = [EMAIL PROTECTED];
$header = To: User Name [EMAIL PROTECTED]\r\n;
$header .= Cc: Other User [EMAIL PROTECTED]\r\n;
$header .= Bcc: Third User [EMAIL PROTECTED]\r\n;
mail($to_recipient, $subject, $body, $header);

FAILS on with SMTP error on the three recipients passed on the $header
field.

Expected result:

Expected that the mail layer exctracts only the mail address from
recipients to send the SMTP commands:

As seen on the RFC's 2821 and 2822, when sending a mail with the
recipient headers formed like above, it is expected the mail layer to
extract ONLY the email address to send the RCPT commands, and pass the
headers without any change in the DATA command during the SMTP
transaction. Example of the  correct SMTP transaction for the above
headers:

RCPT TO:[EMAIL PROTECTED]
RCPT TO:[EMAIL PROTECTED]
RCPT TO:[EMAIL PROTECTED]

DATA

To: User Name [EMAIL PROTECTED]
Cc: Other User [EMAIL PROTECTED]
Bcc: Third User [EMAIL PROTECTED]


Actual result:
--
You get that error for all recipients with the recipient name:

Warning: mail(): SMTP server response: 501 SomeOne Name
[EMAIL PROTECTED]: @ or . expected after SomeOne in
mail.class.php on line 333

This error is produced when the mail layer is sending a wrong formed
RCPT TO: command in the SMTP transaction.





-- 
Edit this bug report at http://bugs.php.net/?id=28038edit=1