How to post a comment on e-mail reply? [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this questionI have Django app that presen开发者_开发问答ts a list of items that you can add comments to.
What i basically want to do is something like the Facebook did: when someone post a comment on your item, you will receive an e-mail. What I want to do, is when you reply to that e-mail, the reply to be posted as a comment reply on the website.
What should I use to achieve this using python as much as possible ? Maybe even Django ?
Check out Lamson - an SMTP mail server/relay written in Python that can use the Django ORM. That's the way I'm going, particularly as I want real-time processing of emails, not queued-up/scheduled emails.
I'm working on a similar idea, and just did a bunch of research. If you want to roll your own lamson is the way to go.
If you don't want to manage your own mail server you can use one of these 3rd party services. You set them up to receive your email, and you configure different Filters and when something matches the filter it will post the message to the URL you specify. It costs money but you get lots of cool features out of the box and you don't need to worry about managing any email servers.
http://sendgrid.com/documentation/ApiParse
http://mailgun.net
http://www.emailyak.com
You can for example write script for importing comments from mailbox(for example 1-3 minutes for cron). You should connect to special mailbox which collects replies from users(comments). Every mail have own header and title. You really can find out which post user try to comment(by header or title), and then import django enviroment and insert new recods.
I think a good way is how Google+ handles it using a + on email address it can be reply+id-or hash-of-parent@domain.com then u must write a worker that check the POP server and
精彩评论