Skip to main content

使用手册

1.快速开始

1)配置全局配置

默认搜索路径:emaileer.ini、emailer.ini、~/emaileer.ini、~/emailer.ini

[demo-sender]
host = smtp.qq.com
port = 25
username = 172xxx032@qq.com
password = kafnxxxxtjsgjbhg

[test-sender]
host = smtp.qq.com
port = 25
username = 1727xxxx032@qq.com
password = kafnxxxxtjsgjbhg
fromName = kancy
encoding = utf-8
debug = True

2)使用指定email sender发送邮件

import emaileer

# 发送文本邮件
emaileer.sendText("demo-sender", "测试标题", "hello", "7932xxx61@qq.com")

# 发送Html邮件
emaileer.sendText("demo-sender", "测试标题", "<h3>hello</h3>", "7932xxx61@qq.com")

# 发送Html模板邮件
emaileer.sendText("test-sender", "测试标题", "demo.html", "7932xxx61@qq.com", k1='v1', k2='v2')

# 发送附件邮件
emaileer.sendText("test-sender", "测试标题", "demo.html", "7932xxx61@qq.com", files="file1.txt,file2.txt")

2.使用内置EmailSender

  • QQ邮箱:QQEmailSender
  • 网易邮箱:NeteaseEmailSender
  • 谷歌邮箱:GoogleEmailSender
import emaileer

# 定义一个QQ Email Sender
sender = emaileer.QQEmailSender("1727xxxx32@qq.com", "kafnedgxxxxsgjbhg", fromName="姓名")

# 发送文本邮件
sender.sendText("测试标题", "hello", "7932xxx61@qq.com")

# 发送Html邮件
sender.sendText("测试标题", "<h3>hello</h3>", "7932xxx61@qq.com")

# 发送Html模板邮件
sender.sendText("测试标题", "demo.html", "7932xxx61@qq.com", k1='v1', k2='v2')

# 发送附件邮件
sender.sendText("测试标题", "demo.html", "7932xxx61@qq.com", files="file1.txt,file2.txt")

3.自定义EmailSender

import emaileer

# 自定义
sender = emaileer.EmailSender("smtp.qq.com", 443, "username", "password")
# 发送文本邮件
sender.sendText("测试标题", "hello", "7932xxx61@qq.com")

Metadata

Release files for emaileer 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for emaileer 0.0.4
File Size Uploaded Provenance
emaileer-0.0.4.tar.gz 7.1 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for emaileer 0.0.4
File Interpreter ABI Platform
emaileer-0.0.4-py3.9.egg Legacy Egg format - - Details
emaileer-0.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 22.9 kB

Release files / emaileer-0.0.4.tar.gz

Download URL emaileer-0.0.4.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a780ef0a076e0bcc49947e0e7505049c795536d4ee8a32d8ffeaaa6437b8ad40
BLAKE2b-256 checksum
How to use checksums
9604f8312ea33f9e29013778f6d81d6288c40b382f9a87ff8689002782fa8a96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / emaileer-0.0.4-py3.9.egg

Download URL emaileer-0.0.4-py3.9.egg
Size 10.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
4c3cad90d28b9a9d0f72d0c0d2fa1d2fa31d23145db9ce5012fb44895c08dcda
BLAKE2b-256 checksum
How to use checksums
d356993aa2b4840490ff28b1cf83718836da7f9baab9b20d698470635bdd989b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / emaileer-0.0.4-py2.py3-none-any.whl

Download URL emaileer-0.0.4-py2.py3-none-any.whl
Size 5.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1c2e0b837bebb9e7468f98f03aab0a69a24ad6f02686c68b5604240750ffe6b3
BLAKE2b-256 checksum
How to use checksums
347a82ba9b76beafe24545086e424395e58c8f372326dfef7e8beed460355544
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for emaileer 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page