Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Send Email for Python

Project description


对 Python 内置模块 email 和 smtplib 的简单封装


目前 lightmail 支持的 Python 环境有 2.7, 3.4, 3.5, 3.6, 3.7

为了简化安装过程,推荐使用 pip 进行安装

pip install lightmail

升级 lightmail 到新版本:

pip install -U lightmail

如果需要安装 GitHub 上最新代码:

pip install


首先需要配置文件 lightmail.cfg, 文件模板可参考 sample.cfg, 配置文件查找路径为

  • 工程当前目录
  • 运行环境家目录
  • 配置目录 etc


from lightmail import send_email

params = {
    "to": "",
    "title": "TESTING",
    "content": "Hello Python",
    "attach": ["@/tmp/test.txt"]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for lightmail, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size lightmail-1.0.0-py3-none-any.whl (5.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page