pallets-eco/flask-mail

Message.attach() is not working without specifying arguments

Closed this issue · 1 comments

Hey guys,

Flask-mail 0.9.1
Python: 3.9.5

This doesn't work:
msg = Message(...)
with app.open_resource('foo.txt') as fp:
msg.attach('foo.txt', 'text/plain', fp.read())

This works:
msg = Message(...)
with app.open_resource('foo.txt') as fp:
msg.attach(filename='foo.txt', content_type='text/plain', data=fp.read())

Best,
niko

I can't reproduce this issue.