简体   繁体   中英

Python: My server mail is sent to spam

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 <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

It also worked before when I made CQ be invite@campusquery.com instead. However, when this way does not allow me to define a sender.

How do I fix this?

Thanks.

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.

我认为“发件人”地址必须是有效的电子邮件地址-例如,具有<some name>@和有效的hostbob@example.com -以便GMail不考虑它垃圾邮件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM