[issue21296] smtplib Sends Commands in Lower-Case

2014-04-19 Thread Luiji Maryo

Luiji Maryo added the comment:

Apologies, I was tired when I looked into this. It turns out that SMTP is 
explicitly case-insensitive with command names. I still think it'd be nice to 
use upper-case commands for consistency with the FROM: and TO: lines, though, 
or to put the FROM: and TO: lines in lower-case.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21296
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21296] smtplib Sends Commands in Lower-Case

2014-04-18 Thread Luiji Maryo

New submission from Luiji Maryo:

It has occurred to me while testing an SMTP server with smtplib that it sends 
commands in lower-case. This is problematic because, although most SMTP servers 
seem to be case-insensitive, RFC 5321 (SMTP) doesn't seem to explicitly require 
this and there may be systems out there which require upper-case commands. 
Additionally, the output just looks unclean because the parameters are given 
capitalized (e.g. we get mail FROM:g...@example.com instead of MAIL 
FROM:g...@example.com or mail from:g...@example.com.

I would propose that putcmd() use cmd.upper(). Alternatively, all instances of 
putcmd() and docmd() could be updated to have the commands in capitalized form 
so that, should the user desire, they could send lower-case commands, though I 
don't quite see what would be useful about that.

--
messages: 216779
nosy: luiji
priority: normal
severity: normal
status: open
title: smtplib Sends Commands in Lower-Case
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21296
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com