Skip to content

Instantly share code, notes, and snippets.

@powerexploit
Created October 30, 2019 03:38
Show Gist options
  • Save powerexploit/7fbecefea8cb232e53fa4d17b0bb0579 to your computer and use it in GitHub Desktop.
Save powerexploit/7fbecefea8cb232e53fa4d17b0bb0579 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import smtplib
import getpass
smtpobj = smtplib.SMTP('smtp.gmail.com',587)
my_email = input("What is your gmail?:")
my_passw = getpass.getpass("Enter the password:")
smtpobj.starttls() 
#This step enables encryption(TLS Encryption) for your connection.
smtpobj.login(my_email,my_passw)
#this will help user to logged in gmail account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment