import smtplib #simple mail transfer protocol is being imported
from email.message import EmailMessage/* #*imports all the functions from email.message 
email = EmailMessage() #Creating an object for EmailMessage
email['sender'] = 'senders name' #Sender
email['reciever'] = 'reciever's id' #Reciever
email['subject'] = 'subject' #Subject of email
email.set_content("body/content of email") #content or body of email
with smtlib.SMTP(host='smtp.gmail.com',port=587)as smtp:     
#sending request to server 
smtp.ehlo() #object of server
smtp.starttls() #sending data between server and client or user
smtop.login("email_id","Password") #login id and password of senders gmail account
smtp.send_message(email) #Sending the email
print("email sent successfully") #confirmation