Title: Email integration
Tags: python;django;email
Question: I was wondering if someone could help me out.  In some web application, the app will send out emails, say when a new message has been posted.  Then instead of signing into the application to post a reply you can just simply reply to the email and it will automatically update the web app with your response.
My question is, how is this done and what is it called?
Thanks


Here is another answer: This is an area where the Rails-world is ahead: Rails has built-in support for receiving emails. The mail sever configuration though is probably just the same.

Here is another answer: A common tool used for this purpose is procmail.
You need to set up dedicated email address (which is the "from_email" address in your outgoing email). Then your MTA, such as postfix or qmail, will deliver mail to that address to procmail instead of an actual mailbox.
Procmail can then pass the email on to your python script that can do updates in the app.  See standalone django scripts by James Bennett on how to code python scripts that can work with your app.

Here is another answer: Generally:
1) Set up a dedicated email account for the purpose.
2) Have a programm monitor the mailbox (let's say fetchmail, since that's what I do).
3) When an email arrives at the account, fetchmail downloads the email, writes it to disk, and calls script or program you have written with the email file as an argument.
4) Your script or program parses the email and takes an appropriate action.
The part that's usually mysterious to people is the fetchmail part (#2).
Specifically on Mail Servers (iff you control the mailserver enough to redirect emails to scripts):
1-3) Configure an address to be piped to a script you have written.
4) Same as above.

Here is another answer: From your tags, I'll assume you're wanting to do this in Django.
There's an app out there called jutda-helpdesk that does exactly what you're looking for using poplib, which means you just have to set up a POP3 compatible email address.
Take a look at their get_email.py to see how they do it.  You just run this script from cron.

Here is another answer: To see a working example on how to receive emails in python and process then using django, check this: http://code.google.com/p/jutda-helpdesk/

Here is another answer: You should take a look at Lamson; it'll enable you do what you've described, and more besides.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 6, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 2.5', 'CreationDate': '2009:00:03/13/09', 'FavoriteCount': 8.0, 'PostTypeId': 1, 'Tags': '<python><django><email>', 'Title': 'Email integration', 'ViewCount': 1848, 'id': 640970, 'user_AboutMe': '', 'user_AccountId': 28035.0, 'user_DisplayName': 'Joe', 'user_Reputation': 4373.0, 'user_Views': 225.0, 'user_id': 74474.0}}