跳到主要内容

📧 Email API 参考

子库名:poemail | 安装:pip install poemail 导入:import officeimport poemail

send_email

参数类型必填说明
keystr邮箱授权码
msg_fromstr发件人
msg_tostr收件人
msg_ccstr抄送
attach_fileslist附件列表
msg_subjectstr主题
contentstr正文
hoststrqq / 163 / gmail
portint默认 465

receive_email

接收邮件。

示例

import office

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