forked from metafy-social/python-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
22 lines (16 loc) · 624 Bytes
/
Copy pathscript.py
File metadata and controls
22 lines (16 loc) · 624 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Script to automate Email Sending
"""Note: To run this script enable "Less Secure Apps" shown in Readme file"""
import smtplib
to = input("Enter the Email of recipent:\n")
content = input("Enter the Content for E-Mail:\n")
sender_email = input("Enter Your Email Address: ")
sender_password = input("Enter Your Password: ")
def sendEmail(to, content):
server = smtplib.SMTP("smtp.gmail.com", "587")
server.ehlo()
server.starttls()
server.login(sender_email, sender_password)
server.sendmail(sender_email, to, content)
server.close()
print("Email Successfully send\n")
sendEmail(to, content)