Django的发送邮件是基于django的一个组件进行操作的,EmailMessage 基本使用方法: def send_html_mail(subject, html_content, from_addr, recipient_list,mytags): try: msgdict = {'message-id':get_message_id(domain = DNS_NAME,),'X-Mailgun-Tag':mytags} msg = EmailMessage(subject, html_…