python smtp
时间: 2023-08-25 20:14:01 浏览: 91
python基于SMTP协议发送邮件
Python SMTP是一个用于发送邮件的模块。可以使用SMTP对象的sendmail方法来发送邮件。发送邮件的语法如下:
SMTP.sendmail(from_addr, to_addrs, msg[, mail_options, rcpt_options])[1]
在使用QQ邮箱发送邮件之前,首先需要获取QQ邮箱的授权码。获取授权码的步骤如下:
1. 登录QQ邮箱
2. 在设置中找到账户,点击生成授权码
3. 将生成的授权码保存,作为登录SMTP时的密码。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [【Python】SMTP发送邮件](https://blog.csdn.net/qq_38140292/article/details/112328783)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *2* *3* [python之SMTP发送邮件信息](https://blog.csdn.net/qq_44690947/article/details/107549248)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文