Skip to content

Commit

Permalink
add attachment header to non-inline images
Browse files Browse the repository at this point in the history
  • Loading branch information
skoobasteeve committed Feb 19, 2022
1 parent d2955d0 commit 5392343
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yagmail/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def prepare_message(
msg_related.attach(content_object["mime_object"])
else:
# non-inline images get attached like any other attachment
content_object["mime_object"].add_header("Content-Disposition",
f"attachment; filename= {content_string}")
msg.attach(content_object["mime_object"])

else:
Expand Down

0 comments on commit 5392343

Please sign in to comment.