mattupstate/flask-mail — pull request #84 by bmathieu33 (2014-09-05 10:27:21+00:00)
Title: Ascii filenames

convert attachments filenames to an ascii equivalent.

In my case I needed it because when sending utf-8 filenames it seems my mail relay modifies the body (it inserts a tracking pixel) and mess up content disposition. But I believe it's useful if you just want to send "safer" filenames from non-ascii ones.

PR has test and doc update.

Maybe there is a better name for the feature, feel free to rename it if you want. Or even suggest a new name and I will update the PR.

side effect: ascii attachment were like `Content-Disposition: attachment;filename=test doc.txt` (current code performs manual formatting), with my PR it's done by MimeBase too, as for UTF-8 ones, so expect `Content-Disposition: attachment; filename="test doc.txt"` (space after semicolon, quotes around filename)