Create a CLI in Python for sending emails. The CLI should be interactive and should prompt users for the To address, Subject and message body of the emails.
Not Applicable
import smtplib

while True:
 print('========Email Tool========')
 to_addr = input('To: ')
 subject = input('Subject: ')
 body = input('Message: ')
 print('=========================')
 
confirm = input('Send email?[y/n]: ')
if confirm.lower() == 'y': 
 smtpObj = smtplib.SMTP('smtp.gmail.com', 587)
 smtpObj.starttls()
 
# replace with your own email address and password
 smtpObj.login('me@gmail.com', 'mypassword')
 smtpObj.sendmail('me@gmail.com', to_addr, 
f'Subject: {subject}\n\n{body}')

 print('Email sent!')
 smtpObj.quit()
else:
 print('Email discarded!')