Log in to follow projects

Following a project allows you to receive updates via email. It also lets the owner know that you like them.

×

DevLogs.Fun

By Oliver Smith, Kaitlyn

Project blogs for everyone!

90% complete
8 followers 18968 views
About Log (14) Discussion (12)
See more posts

Email notifications are go


Most of my free time lately has been spent on the game, but I spent all today working on email notifications for the site. You should now get an email whenever somebody comments on a project you're following, or whenever there's a new log entry. I'm not totally happy with the implementation - the email sending happens in the HTTP request, so that means the user has to wait for email to send for the 'save' operation to finish. I wanted to do it in the background but Heroku doesn't seem to offer a cheap way to instantly run a background job.

I also had to modify django-mailgun a bunch to get it to send batch email. I couldn't get mailgun to batch send with the messages.mime endpoint, so that took a while to figure out. In the end I converted it to not use MIME on my side - now it sends text and HTML versions of the email to mailgun and lets them package it up.

This is definitely the kind of code that would really benefit from a test suite, which I have not targeted for the MVP edition of the site. :)

ANYWAY, the code may still be buggy so please let me know if you see anything weird, or if you are not happy with the way I implemented email notifications!