Message.attach() is not working without specifying arguments
Closed this issue · 1 comments
Deleted user commented
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
davidism commented
I can't reproduce this issue.