# Send e-mail function
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
 
 
def send_email(_me):
    emailhost='send.mx.example.com'
    title='It is test e-mail'
    bodytext='This mail informs you of the error about certain service with probe checking logic.' + '\n If you received this email, please check it.\n \n' + _me
    sender='me@example.com'
    receiver=['who@example.com']
     
    msg=MIMEText(bodytext)
    msg['Subject']=title
    msg['From']=sender
    msg['To']=', '.join(receiver)
    s=smtplib.SMTP(emailhost)
    s.sendmail(sender, receiver, msg.as_string())
    s.close()
 
send_email(_me)
callIEM1(_me)

+ Recent posts