简单的连接邮箱, 生成邮件并发送
Project description
EmailLib
EmailLib 简单的连接邮箱, 生成邮件并发送.
from send_email_zxx.emailLib import MailBox, SendEmailAlert, email_director
config = {
"mail_port": 587,
"mail_host": "smtp.qq.com",
"mail_user": "user", # 邮箱用户名
"mail_pass": "", # 授权码
}
message = {
"Subject": "Test ...", # 主题 必填
"Body": "<h1>test send email</h1>", # 正文 必填
"To": "xxxxx@qq.com,xxxxx@qq.com", # 接收人 必填
"Cc": "xxxxx@qq.com,xxxxx@qq.com", # 抄送人 可选
"From": "xxxxx@qq.com", # 发送人 必填
"Attachment": [ # 附件 可选
{
"path": "文件完整路径",
"filename": "文件名称",
"maintype_subtype": "maintype/subtype"
}
]
}
# 连接邮箱
mail_box=MailBox(config)
# 生成邮件
email_alert = SendEmailAlert(mail_box, **message)
# 发送邮件
email_director(email_alert, mail_box)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
send_email_zxx-1.0.1.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file send_email_zxx-1.0.1.tar.gz.
File metadata
- Download URL: send_email_zxx-1.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23f5e6e5097245910ac511df495b2ba4d5f403774721961ef989728745d7e447
|
|
| MD5 |
b45905aebdfecbdd14d251398c4c610b
|
|
| BLAKE2b-256 |
f18f6ab4c285e54a8715aff1bad9c0bf6600b5efd8b006fbc79f45a3269d9a8d
|
File details
Details for the file send_email_zxx-1.0.1-py3-none-any.whl.
File metadata
- Download URL: send_email_zxx-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e58921a15ed24e4e2a7aecee4b8a98def716689ef3448a0b33ae3551dacb40c8
|
|
| MD5 |
a3afe8beffab8d30cd2f3e8d756a321c
|
|
| BLAKE2b-256 |
34154b9663901a3624514e6d7b0cff5e67f4c25624421ae5ada40b883834127d
|