Skip to main content

email_helper

only support python3

默认服务器为163免费邮箱服务器,也可以自己配置

安装

$ pip install email-helper

发送邮件

from email_helper.email_sender import EmailSender

# 实例化
email = EmailSender(from_addr="xxx@163.com", password="xxx")

# 设置标题
email.set_header("这是邮件标题")

# 添加正文
email.add_text("这是邮件的文本")

# 添加收件人
email.add_receiver("ooo@163.com")

# 发送
email.send()

接收邮件

from email_helper.email_receiver import EmailReceiver

# 实例化
client = EmailReceiver(email="xxx@163.com", password="xxx")

# 接收最后一封邮件
email = client.get_last_email()

# 打印邮件信息
for k, v in email.items():
    print(k , v)

"""
From  <xxx@163.com>
To  <ooo@163.com>
Subject 这是邮件标题
text ['这是邮件的文本']
attachment []
"""

Release files for email-helper 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 email-helper 0.0.4
File Size Uploaded
email_helper-0.0.4.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for email-helper 0.0.4
File Interpreter ABI Platform
email_helper-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / email_helper-0.0.4.tar.gz

Download URL email_helper-0.0.4.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
aa4315a6e849c2e26adf9215c3aba6df5ab624e9df6db092912240537688593f
BLAKE2b-256 checksum
How to use checksums
683df191c5f99491927b6e589affaf44cea33e42fbc71e33ed191f1f08a78814
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / email_helper-0.0.4-py3-none-any.whl

Download URL email_helper-0.0.4-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
845df95c64f09415f50a782fbf784474b1b6a7c7558271e387d847f70da21033
BLAKE2b-256 checksum
How to use checksums
f2cf4dfba94bbded9f241bc979ab05c4fd3c5537cee3fea15178a9a12cff3770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

3 release files

0.0.1

2 release files

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