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.