joyyzhang将源码已经放在了github上
https://github.com/zydirtyfish/asm.git
欢迎Fork!!!
joyyzhang为了能够实时监测服务器上程序的运行状态实现的一个自动发送email的程序。
首先看一下README.md
asm
Auto Send Mail Tool ( ASM )
This tool can help you to send emails in the form of HTML automatically. The only thing you need to do is to write the mail_content according to the format given in the source file. You can also modify this file by using the api given in writeAPI.py.
Start your “Hello world” mail by excuting sh auto_send.sh if you have create the mail_content metioned above.
send_mail.py
This is the kernel file by encapsulating smtplib. There is no need for you to know how it is realized, because you only need to modify the mail_content if you want to send mails automatically.
writeAPI.py
You can modify the mail_content much easier by using the api in this file.
- write_content(html) : To modify the mail_msg
- write_send_list(send_list) : To modify the send_list
- write_accessory_list(accessory_list) : To modify the accessory list
- write_img_list(img_list) : To modify the images contained in the main_msg
- write_all(content,subject,encoding,send_list,accessory_list,img_list) : To modify the parameters all above
mail_config
Always likes this.
[mail_config]
sender = XXXX@yyy.com It is your own email address
sender_name = your_name Your own name
password = **** Password of you email, always the smtp password
mail_host = smtp.yyy.com SMTP server domain. You can always find it on the Internet
mail_postfix = yyy.com
mail_content
Always likes this.
[mail_content]
send_list = XXXX@yyy.com who will receive this mail
subject = Pic Subject of this mail
encoding = utf-8 Encoding o

ASM是一个自动发送HTML格式邮件的Python工具,由joyyzhang开发并托管在GitHub上。通过编写符合规定格式的`mail_content`,利用`writeAPI.py`中的API可以轻松修改邮件内容、发送列表等参数。核心文件`send_mail.py`封装了smtplib,用户只需关注邮件内容的编写,无需了解内部实现。
最低0.47元/天 解锁文章
2762

被折叠的 条评论
为什么被折叠?



