2020
09-29
09-29
python3.6使用SMTP协议发送邮件
本文实例为大家分享了python3.6使用SMTP协议发送邮件的具体代码,供大家参考,具体内容如下代码如下:#!/usr/bin/python3#coding:utf-8importsmtplibfromemail.headerimportHeaderfromemail.mime.textimportMIMETextfromemail.utilsimportparseaddrfromemail.utilsimportformataddrdefformat_addr(s):name,addr=parseaddr(s)returnformataddr((Header(name,"utf-8").encode(),addr))from_email="email@...
继续阅读 >