[issue29860] smtplib.py doesn't capitalize EHLO.

Lord Anton Hvornum report at bugs.python.org
Mon Mar 20 10:59:16 EDT 2017


Lord Anton Hvornum added the comment:

Turns out, this goes for a lot more commands, such as:

```
Traceback (most recent call last):
  File "mail.py", line 12, in <module>
    smtp_server.sendmail(fromaddr, toaddrs, msg)
  File "/usr/lib/python3.6/smtplib.py", line 866, in sendmail
    raise SMTPSenderRefused(code, resp, from_addr)
```

The command that the server refused was:

    mail FROM:<my_mail at gmail.com> size=11

Again, this is mostly because traditionally server commands are upper case (even tho RFC 821 defines that they can be any syntax, such as `mAiL FroM`).

But it would be nice if Python could keep consistency in it's syntax IMHO.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29860>
_______________________________________


More information about the Python-bugs-list mailing list