Quick Poster
一个简单易用的邮件发送工具,基于Python实现。
项目简介
Easy Mail Sender是一个轻量级的邮件发送库,旨在简化Python应用程序中的邮件发送流程。它提供了简洁的API,使您能够轻松地发送电子邮件,而无需处理底层的SMTP细节。
特性
- 简单易用的API
- 支持SSL加密连接
- 基于环境变量的配置管理
- 使用数据类进行邮件信息的结构化管理
安装
使用PDM安装:
pdm add easy-mail-sender
或者使用pip:
pip install easy-mail-sender
配置
在使用之前,您需要设置以下环境变量:
EMAIL_HOST_USER=your_email@example.com
EMAIL_HOST_PASSWORD=your_email_password
您可以创建一个.env文件在项目根目录下,或者直接在环境中设置这些变量。
使用示例
from easy_mail_sender import MailInfo, MailWorker
# 创建邮件信息
mail_info = MailInfo(
receiver_email="recipient@example.com",
subject="测试邮件",
body="这是一封测试邮件的内容。"
)
# 创建邮件工作器并发送邮件
worker = MailWorker(mail_info)
worker.send()
自定义SMTP服务器
默认情况下,Easy Mail Sender使用腾讯企业邮箱的SMTP服务器。如果您需要使用其他SMTP服务器,可以在创建MailWorker实例后修改相关属性:
worker = MailWorker(mail_info)
worker.mail_server = "smtp.gmail.com"
worker.port = 587
worker.send()
开发
环境设置
- 克隆仓库:
git clone https://github.com/yourusername/easy-mail-sender.git
cd easy-mail-sender
- 使用PDM安装依赖:
pdm install
运行测试
pdm run pytest
许可证
本项目采用MIT许可证 - 详情请参阅LICENSE文件。
贡献
欢迎提交问题和拉取请求!
Metadata
Release files for quick-postman 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quick_postman-0.1.0.tar.gz | 2.6 kB | Without provenance | Details for quick_postman-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quick_postman-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for quick_postman-0.1.0-py3-none-any.whl |
Total release size: 5.7 kB
Release files / quick_postman-0.1.0.tar.gz
| Download URL | quick_postman-0.1.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6d8794b8b0dfdd445929c6fb3bc4bd8fd23a6098be6b1c0476eb9f43abc6af3
|
|
BLAKE2b-256 checksum How to use checksums |
619d4ee69459b5d186f8a9dd323299c9952aec26668c0d565453f6c2f54830e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / quick_postman-0.1.0-py3-none-any.whl
| Download URL | quick_postman-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3212a239cae18bc33922beee8cfba7388a9e3d410069f8c21c6e29a7af1afb26
|
|
BLAKE2b-256 checksum How to use checksums |
5ee2f769ec6b0c770e4bc61c11e0c221f5bca1907f314de76323d2099fbd075b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Security for quick-postman 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.