I have a Yagmail script where I want to send an email formated like so:
Hello! Below is a picture.
img.png
Goodbye!
However, my script is just sending the image all the way at the bottom of the email. Here is my code:
img = "img.PNG"
body = "Hello! Below is a picture." + img + "Goodbye!"
contents = [body, img]
yag.send("[email protected]", "Subject", contents)
How would you send an email using a format where you can position the image between blocks of text? Help is appriciated!
contents = [yagmail.inline("/path/to/local/image")]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With