Automated Emails using Python This code can be used to automate sending emails using Python. The subject and body of the email that we send includes the name of the recipient and we can also attach a file (such as your resume) to the email.