Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Jun 11, 2021
Embed
What would you like to do?
import os
import random
import smtplib
def automatic_email():
user = input("Enter Your Name >>: ")
email = input("Enter Your Email >>: ")
message = (f"Dear {user}, Welcome to Thecleverprogrammer")
s = smtplib.SMTP('smtp.gmail.com', 587)
s.starttls()
s.login("Your Gmail Account", "Your App Password")
s.sendmail('&&&&&&&&&&&', email, message)
print("Email Sent!")
automatic_email()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment