-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sendy.py
34 lines (22 loc) · 799 Bytes
/
Sendy.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
# coding: utf-8
# ! /usr/bin/python
__author__ = 'Shahariar Rabby'
# This will read details and send email to clint
# # Sendy
# ### Importing Send mail file
# In[6]:
from Sendmail import *
# ** Take user email, text plan massage, HTML file **
# In[7]:
TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciver email as input
subject = raw_input("Enter Mail Subject : ") #taking mail subject
text = raw_input("Enter Plain message(or html format) : ") #Taking plane massage as input
filename = raw_input('Enter file name with location(if any) : ')
try:
file = open(filename,'r') #reading HTML format message
html = file.read()
except:
html = text
# **Calling send mail and sending mail **
# In[8]:
Send_Mail(login(),TO_EMAIL=TO_EMAIL,text=text,html=html,subject=subject)