Python:我的服务器邮件被发送到垃圾邮件
我正在尝试从我正在编写的应用程序发送电子邮件验证电子邮件。我使用 server = smtplib.SMTP()
和 server.sendmail()
在 Linode 上运行。由于某种原因,gmail 将这些邮件标记为垃圾邮件。
我的邮件模板是:
{% if define('From', 'CQ <[email protected]>') or define('Reply-To', '[email protected]') or define('Subject', "CQ: You've been invited to our beta!") %}{{fail()}}{% end %}
msg goes here
当我将 CQ 设置为 [email protected] 相反。但是,当这种方式不允许我定义发件人时。
我该如何解决这个问题?
谢谢。
I'm trying to send email verification emails from an app I'm writing. I'm running on Linode using server = smtplib.SMTP()
and server.sendmail()
. For some reason, gmail is marking these messages as spam.
My mail template is:
{% if define('From', 'CQ <[email protected]>') or define('Reply-To', '[email protected]') or define('Subject', "CQ: You've been invited to our beta!") %}{{fail()}}{% end %}
msg goes here
It also worked before when I made CQ be [email protected] instead. However, when this way does not allow me to define a sender.
How do I fix this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您从哪个服务器发送?还有大量其他因素,例如 IP 黑名单、消息速率、用户是否将您标记为垃圾邮件、DNS/反向 DNS、SPF 记录。
您可以考虑注册 litmus.com 帐户来测试您的电子邮件,看看您在垃圾邮件列表上的表现如何,以及可以采取哪些措施来改进它。
What server are you sending from? There are tons of other factors involved like IP blacklists, rate of messages, whether users have marked you as spam, DNS/reverse DNS, SPF records.
You might consider signing up for an account with litmus.com to test your emails and see how you're performing on spam lists, and what you can do to improve it.
我认为“发件人”地址需要是有效的电子邮件地址 - 例如,具有
、@
和有效的主机
,如[电子邮件受保护]--为了让 GMail 不将其视为垃圾邮件。
I would think that the "From" address would need to be a valid email address--e.g., have
<some name>
, an@
and a validhost
like in[email protected]
--in order for GMail to not consider it spam.