-
Notifications
You must be signed in to change notification settings - Fork 0
/
tk_msg.py
32 lines (32 loc) · 909 Bytes
/
tk_msg.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
import smtplib
from tkinter import *
root=Tk()
root.geometry("800x800")
root.title("SENDING A MAIL")
root.configure(bg="green")
lb=Label(text="MALING SYSTEM",font=("arial",30,"bold"),bd=30,bg="green")
lb.place(x=300,y=10)
label1=Label(root,text="FROM",bd=10)
label1.place(x=300,y=200)
entry1=Entry(bd=10)
entry1.place(x=400,y=200)
label2=Label(root,text="TO",bd=15)
label2.place(x=300,y=300)
entry2=Entry(bd=10)
entry2.place(x=400,y=300)
label3=Label(root,text="MESSGE",bd=10)
label3.place(x=300,y=400)
entry3=Entry(bd=10)
entry3.place(x=400,y=400)
def sendmail():
content=entry3.get()
print(entry3.get())
mail=smtplib.SMTP('smtp.gmail.com',587)
mail.ehlo()
mail.starttls()
mail.login('jijusebastian2@gmail.com','9744305407')
mail.sendmail(entry1.get(),entry2.get(),content)
mail.close()
buttton1=Button(text="send details",command=sendmail,bd=40,bg="red")
buttton1.place(x=400,y=550)
root.mainloop()