WebFaction
Community site: login faq

What is the best way to process inbound emails within a Django app using the Send to a program feature on an email inbox. I have already tested a pyhton script that receives an email and writes it to a file, and I also have tested a callable python script within django that logs into the email account and processes the mail. But what I need is to be able to process the emails within the django app to create a few instances of a model when the program is run when an email is received. Any ideas?

asked 31 Aug '15, 12:25

Kingpin
112
accept rate: 0%


  1. Implement your "callable python script within django" as a Django management command.
  2. Wrap the management command with a shell script that passes stdin to the management command.
  3. Make the shell script the "send to a program" target for your email address.
permanent link

answered 31 Aug '15, 15:11

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×337
×260
×4

question asked: 31 Aug '15, 12:25

question was seen: 1,260 times

last updated: 31 Aug '15, 15:11

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM