标签类目:mail

Python 邮件模块小应用

分类:Python

  1. #------方案1---------------------
  2. #!/bin/env python
  3. import email.MIMEText
  4. email_body=""" hello,this is a python mail test!""" #定义邮件内容
  5. msg=email.MIMEText.MIMEText(email_body)
  6. msg['To']="blog@linuxany.com" #定义邮件发送目标地址
  7. msg['FROM']="webmaster@linuxany.com" #定义邮件发送源地址
  8. msg['Subject']="this is a python mail test" #定义邮件主题
  9. print msg.as_string()

继续阅读 »

python:支持附件的邮件发送函数

分类:Python使用方法:
  mail(邮件服务器地址,发件人,收件人,主题,邮件内容)
继续阅读 »

How To Delete Mails From Or To A Specific Email Address From Your Mail Queue (Postfix)

分类:PostFixIf you get hit by a spam attack that floods your server with hundreds/thousands of emails from the same sender email address or to the same recipient email address, you can clean your mail queue from these emails with one single command before the mail flood takes your server to its knees.

You can check your current mail queue like this:

postqueue -p

继续阅读 »


返回顶部