import yagmail

receiver = "your@gmail.com" #Receiver's gmail address
body = "Hello there from Yagmail"
filename = "document.pdf"

yag = yagmail.SMTP("my@gmail.com")#Your gmail address
yag.send(
    to=receiver,
    subject="Yagmail test (attachment included",
    contents=body, 
    attachments=filename,
)

[((7, 6, 7, 34), 'yagmail.SMTP', 'yagmail.SMTP', ({(7, 19, 7, 33): '"""my@gmail.com"""'}, {}), "('my@gmail.com')", False, 'import yagmail\n')]