-
Notifications
You must be signed in to change notification settings - Fork 0
/
GMailer.py
49 lines (38 loc) · 1.56 KB
/
GMailer.py
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
41
42
43
44
45
46
47
48
49
#!/usr/bin/python3
import smtplib
import os.path, os
import getpass
def sender(user, passwd):
s = smtplib.SMTP('smtp.gmail.com', 587)
s.starttls()
try:
s.login(user,passwd)
to_mail = input("Email To: ")
subject = input("Subject: ")
message = input("Message: ")
compiled = "From: me <"+user+">\nTo: <"+to_mail+">\nSubject: "+subject+"\n\n"+message
s.sendmail(user, to_mail, compiled)
s.quit()
print ("[+] Mail sent successfully!")
pass
except Exception as e:
print ("[-] Error sending mail! ",e)
def credentials():
user = str(input("Enter your Email ID: "))
passwd = str(getpass.getpass(prompt="Enter your Password: "))
sender(user, passwd)
def home():
print ("""
// ) ) /| //| |
// //| // | | ___ ( ) // ___ __
// ____ ____ // | // | | // ) ) / / // //___) ) // ) )
// / / // | // | | // / / / / // // //
((____/ / // |// | | ((___( ( / / // ((____ //
Created By: PRAMAN KASLIWAL (CR4CKB0X)
Visit My Site --> https://Praman1997.github.io/
GitHub Link --> https://github.com/Praman1997
Note: For this program to work make sure that you have allowed access to less secure apps from your gmail account...
To know more visit this site --> https://support.google.com/accounts/answer/6010255?hl=en
""")
home()
credentials()