跳到主要内容

📧 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']
)