您的位置:首页 > 运维架构

天兔(Lepus)监控邮件推送安装配置

2016-08-19 17:14 423 查看
好吧,我承认官网的邮件配置教程我又没看懂,这里记录下我的配置方法
[root@HE3]# vi /usr/local/lepus/test_send_mail.py
[code=bash;toolbar:false">#!/usr/bin/envpython
# -*- coding: utf8-*-
from datetime import*
import sys
path='./include'
sys.path.insert(0,path)
import functions asfunc
 
#mail_to_list = func.get_option('mail_to_list')
send_mail_to_list =func.get_option('send_mail_to_list')
mailto_list=send_mail_to_list.split(';')
 
result =func.send_mail(mailto_list," I hope you can learn","BeautifulDay")
print result
if result:
    send_mail_status = "success"
else:
    send_mail_status = "fail"
print"send_mail_status:"+send_mail_status
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: