摘要:
如果要发送其他类型的,如果PDF、doc、xls、MP3格式的,我们都可以通过MIMEApplication来完成,MIMEApplication默认子类型是application/octet-stream,而application/octet-stream表明这是个二进制文件,但愿接收方知道怎么处 阅读全文
摘要:
import smtplibfrom email.mime.text import MIMETextfrom email.header import Headerfrom email.mime.image import MIMEImagefrom email.mime.multipart impor 阅读全文
摘要:
import smtplibfrom email.mime.text import MIMETextfrom email.header import Header# 第三方 SMTP 服务# 设置服务器mail_host = "smtp.qq.com"# 用户名mail_user = "132068 阅读全文
摘要:
import smtplibfrom email.mime.text import MIMETextfrom email.header import Header# 第三方 SMTP 服务# 设置服务器mail_host = "smtp.qq.com"# 用户名mail_user = "132068 阅读全文
摘要:
前言 我们在Django中会碰到发送邮件的需求,Django中内置了邮件发送功能,被定义在django.core.mail模块中。发送邮件需要使用SMTP服务器,常用的免费服务器有:163、126、QQ,下面以163邮件为例。 思路 使用Django发送邮件就相当于,事先准备好一个可用的邮箱账户,并 阅读全文