In [ ]:
__author__ = 'Shahariar Rabby'
from Sendmail import * #this is python .py file of the Send Mail.ipynb file
Take user email, text plan massage, HTML file
In [ ]:
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 [ ]:
Send_Mail(login(),TO_EMAIL=TO_EMAIL,text=text,html=html,subject=subject)