mattupstate/flask-mail — pull request #60 by scascketta (2014-01-25 02:54:27+00:00)
Title: Prevents uncaught TypeError when message has no subject

Fixes [Issue #59: TypeError occurs if message has no subject](mattupstate/flask-mail#59)

Prevents a TypeError from occuring later if a user tries to send a Message without a defined subject. Currently, `Message.has_bad_headers()` tries to iterate over the subject, which raises a TypeError if the subject hasn't been assigned to anything. There are no previous checks to make sure `Message.subject` exists. This just adds a simple assertion to explictly warn the user and catch the error early.