Commit Graph

6 Commits

Author SHA1 Message Date
Martijn van de Streek a057080bad Fix removing of Content-Type header from transport headers (#16)
The fourth argument to `re.sub` is `count`, but `re.I` (a flag) was passed
instead.

Because if this, messages with a lower-case "content-type" header would
never have their content-type header removed, leading to parse errors.

By explicity naming the parameter (`flags=`) to re.sub, the match
actually becomes case-insensitive.
2021-05-03 17:56:05 -04:00
Manabu Niseki 7f80b8e6bc Improve attachment filename normalization (#14)
Use `os.path.basename` instead of `urllib.parse.quote_plus` to improve filename normalization.
2020-07-05 18:47:28 -04:00
Alfredo 73fac36c80 Check for ATTACH_LONG_FILENAME before ATTACH_FILENAME (#7) 2019-05-22 06:21:36 -04:00
Alfredo eee84c759f Check for key in props (#8) 2019-05-22 06:20:10 -04:00
Joshua Tauberer 4779154c8c urlencode attachment filenames to avoid some recursion depth exceeded error when message is converted to bytes 2018-03-16 17:35:24 -04:00
Joshua Tauberer 3f72102e4b initial commit 2018-03-14 16:24:47 -04:00