You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I have found Red Mail very useful for embedding images, but I also need to attach an image. In your documentation, you have attachment examples for css, xlsx, html. So would it be possible to have an example to attach a image.png?
I have tried attachments={'xxx.png':'image/PIL'}, attachments={'xxx.png':'/xxx.png'}, attachments={'xxx.png':'./xxx.png'}, but there is no attachment when I get my email. My image xxx is in the same folder as my notebook and the png was created using Pillow.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi. I have found Red Mail very useful for embedding images, but I also need to attach an image. In your documentation, you have attachment examples for css, xlsx, html. So would it be possible to have an example to attach a image.png?
I have tried attachments={'xxx.png':'image/PIL'}, attachments={'xxx.png':'/xxx.png'}, attachments={'xxx.png':'./xxx.png'}, but there is no attachment when I get my email. My image xxx is in the same folder as my notebook and the png was created using Pillow.
email.send(
subject=subject,
sender=sender,
receivers=receivers,
html=email_body_html,
body_params=body_params,
body_images=body_images,
attachments=attachments,
)
Beta Was this translation helpful? Give feedback.
All reactions