New submission from oon arfiandwi <oon.arfian...@gmail.com>:

I want to enhance the error message on the send_message method of class SMTP, 
in module smtplib.

One of the parameters on send_message is msg which is email.message.Message 
object, this is a required argument. If the msg is None, currently it will 
raise "AttributeError: 'NoneType' object has no attribute 'get_all'".
This message is not straight forward and a bit hard to debug.

As the easy fix with additional check if msg is None in send_message method.

I want to add PR on this, also with the additional test(s). This is my first 
issue, appreciate any feedback. thank you.

----------
components: Library (Lib)
messages: 384216
nosy: oon
priority: normal
severity: normal
status: open
title: smtplib send_message should gives more clear exception if the msg is None
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42807>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to