How to send automatic email reminders to individuals?
February 9, 2015 10:34 AM   Subscribe

I am looking for a way to send one or two automated email reminders from a gmail account to people who are signed up to a rota. I am able to send emails in python using smtplib, but I find that they all go straight to junk. I've also tried ssmtp in Ubuntu, but I have the same problem.

Is there a way to send emails to people automatically in a way that would actually make it to their inbox? If using gmail as the mail server is the problem, is there an alternative free option that will do the job? If possible, I'd rather avoid instructing a very tech un-savvy group how to check their junk mail and mark the automated emails as safe.
posted by stinker to Computers & Internet (7 answers total) 1 user marked this as a favorite
 
Quick double checking question: when you're using smtplib, are you just trying to send the email using your local SMTP server without authenticating with GMail to do it? If you are that could be a problem, I imagine providers will junk mail that is coming from some random server but not through GMail servers and just says it's "from" a GMail account, here are a couple of methods to compare yours to:

https://gist.github.com/timrichardson/1154e29174926e462b7a
http://segfault.in/2010/12/sending-gmail-from-python/

Otherwise, I sadly do not know why it's ending up in junk mail.
posted by foxfirefey at 10:45 AM on February 9, 2015


Mandrill is a transactional email service run by the folks who made Mailchimp and I've had success with avoiding spam filters by using it. It's free for use under 12K e-mails per month (though you can pay $1/user to do specific spam tests on that account).

Here's the API documentation for Python.
posted by camcgee at 11:02 AM on February 9, 2015


Hmmm. I tried Mandrill, but it looks I have to pay to schedule reminder emails. I get the following error message when using in python:

"Email scheduling is only available for accounts with a positive balance."

If I remove the "send_at" information, I don't get an error message, but I don't see the email in my inbox or junk mail folder, so I assume it wasn't sent.
posted by stinker at 11:53 AM on February 9, 2015


The Boomerang for Gmail extension for Chrome does email scheduling, and functions entirely within Gmail so should go to their inbox.
posted by feckless fecal fear mongering at 12:48 PM on February 9, 2015


Sorry about that; I've never used Mandrill's scheduler so I didn't notice that restriction. I see this in their help docs:
...message scheduling includes an additional charge for storing the email and managing the schedule. Scheduled emails cost $0.05 for every thousand messages that you schedule, plus $0.02 daily for every thousand emails currently in storage. These charges apply even if you have not used your free send quota for the month, so you can begin using scheduled emails once you have added funds to your account.
Despite the low cost per transaction, it looks like $5 is the lowest level you can fund the account.
posted by camcgee at 4:15 PM on February 9, 2015


If you can send email with smtplib (scheduled via cron?) you can tell smtplib to use your Gmail credentials, like this:
from smtplib import SMTP

s = SMTP('smtp.gmail.com', 587)
s.ehlo()
s.starttls()
s.ehlo() # yes you have to ehlo twice
s.login('your.gmail.username', 'your.gmail.password')
s.sendmail('you@gmail.com', ['them@whatever.com'], 'this is the message')
If you're using Gmail's 2 factor auth you'll need to use an application-specific password.
posted by zrail at 4:49 PM on February 9, 2015


That's exactly how I've set up smtplib, but it all still goes to junk.
posted by stinker at 5:25 AM on February 10, 2015


« Older Keeping on top of the snowstorm -- does it really...   |   Help me buy some shorts Newer »
This thread is closed to new comments.