我正在尝试从我正在编写的应用程序发送电子邮件验证电子邮件。我正在使用server = smtplib.SMTP()
和运行 Linode server.sendmail()
。出于某种原因,gmail 将这些邮件标记为垃圾邮件。
我的邮件模板是:
{% if define('From', 'CQ <Invite@campusquery.com>') or define('Reply-To', 'noreply@campusquery.com') or define('Subject', "CQ: You've been invited to our beta!") %}{{fail()}}{% end %}
msg goes here
当我将 CQ 设置为邀请@campusquery.com 之前,它也有效。但是,当这种方式不允许我定义发件人时。
我该如何解决?
谢谢。