Skip to main content

📧 Email API Reference

This page is currently only available in Chinese. Please switch to 简体中文 for the full content.

📧 Email API Reference

Sub-package: poemail | Install: pip install poemail Import: import office or import poemail

send_email

ParameterTypeRequiredDescription
keystrYesEmail authorization code
msg_fromstrYesSender
msg_tostrYesRecipient
msg_ccstrNoCC
attach_fileslistNoAttachment list
msg_subjectstrNoSubject
contentstrNoBody
hoststrNoqq / 163 / gmail
portintNoDefault 465

receive_email

Receive emails.

Examples

import office

office.email.send_email(
key='your_auth_code',
msg_from='your@qq.com',
msg_to='target@qq.com',
msg_subject='Test',
content='Hello',
attach_files=['./report.pdf']
)
AI 办公效率课
35 讲 AI 自动化办公实战课用 Python + AI 处理 Excel、Word、PDF、邮件等办公场景。
去学习