Send Email using Python, From gmail
Follow this link to turn on less secure app.
import smtplib as sm
message=input('enter your message : ')
try:
server=sm.SMTP('smtp.gmail.com',587)
server.ehlo()
server.starttls()
server.login('YOUR GAMIL ID','YOUR PADSWORD')
server.sendmail('python3community@gmail.com','pawankushwah850@gmail.com',message)
print('successfully sent')
except sm.SMTPAuthenticationError as er :
print(er)
print('something went wrong')
Blog Presented by
~Pawan Kushwah
( Computer science
Department )
"The Innovation Hub"
(Team Member)
#TIH2019
Contact:
Email id .... theinnovationhub2019@gmail.com
Nice Work
ReplyDeleteGreat job
ReplyDeleteKeep it up 👍