-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
20 lines (18 loc) · 762 Bytes
/
main.py
File metadata and controls
20 lines (18 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import smtplib as s
ob = s.SMTP('smtp.gmail.com', 587) # gmail port number 587 , SMTP function used to connection method
ob.ehlo()
ob.starttls()
ob.login('email', 'type youe email password') #login requires aunthentication , use sending email account
subject = input("Enter The Subject Here : ")
body = input("Enter Message Here : ")
msg = "subject:{}\n\n{}".format(subject, body)
# adding reciver emails we can ad multiple email in list
listAdd = []
n = int(input("Enter the number of emails you sending :- "))
for i in range(0, n):
ele = input(f" [{i}] => ")
listAdd.append(ele)
print("\n Sending.....")
ob.sendmail('enter login email', listAdd, msg)
print("\nMail Send Successfully!")
ob.quit()