Project Brief
Your task for this project is to use Python to send an email that contains an attachment. Feel free to include any text in the email body and any file as an attachment.
Environment Setup Instructions
Install yagmail with:
pip install yagmailYou can use your Gmail address as the sender. You can create an app password here and then use that password in the Python script, but make sure you have turned on Gmail 2-step verification first.
Resources
Play the video below to learn how to send an email with an attachment via Python and yagmail:
After I generated code that performed as desired when sending to a gmail account, I thought I would try it with another of my email accounts (one on aol.com) as well. Interestingly, the result was that the link to the attachment was included as part of the message text, without the attachment. The same message in my sent box on gmail did show the attachment as an attachment. When I then generated a message from my gmail account with the attachment, the attachment did appear as an attachment in the aol account. Is this an expected result when sending to accounts on another mail server?