发送邮件想把发送人显示为昵称
发送英文昵称(最简单)
message['From'] = "NickName <XXXX@XXXX.com>"
发送中文昵称方法1
h = Header('老王', 'utf-8')
h.append('<XXXX@XXXX.com>', 'ascii')
message["From"] = h
发送中文昵称方法2
from email.utils import formataddr
message['From'] = formataddr(["老王", "XXXX@XXXX.com"])