Oct-27-2021, 11:35 PM
If use yagmail it's easier.
Quick test works fine for me.
Quick test works fine for me.
import yagmail receiver = "[email protected]" body = "Hello there from Yagmail" filename = "test.pdf" yag = yagmail.SMTP("[email protected]", pass-xxxx) yag.send( to=receiver, subject="Python test with attachment", contents=body, attachments=filename, )