[issue42807] smtplib send_message should gives more clear exception if the msg is None

2021-01-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am not familiar with either smtp or email, but I can make some general comments. 1. "AttributeError: 'NoneType' object has no attribute 'get_all'" seems pretty straightforward to me. Hard to debug? Depends on knowledge and experience. When coming from l

[issue42807] smtplib send_message should gives more clear exception if the msg is None

2021-01-01 Thread oon arfiandwi
New submission from oon arfiandwi : 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 "A