0

how can i implement a server that receives and parse mails, like using the library

from smtpd import SMTPServer

but running forever like i do with wsgi http://webpython.codepoint.net/wsgi_environment_dictionary

(i know it cant be done with wsgi, but is there a way to to this?)

Thanks :)

rgap
  • 47
  • 2
  • 6
  • If you really want to implement your own SMTPServer, you may want to look at writing a daemon: http://stackoverflow.com/questions/473620/how-do-you-create-a-daemon-in-python – Ian Stevens May 29 '14 at 18:16

1 Answers1

0

See the link below for info on how to setup a mail server that will pipe incoming emails to a script: http://harrybailey.com/2009/02/send-or-pipe-an-email-to-a-php-script/. This article is specific to PHP scripts, but the same thing can be done with python.

mti2935
  • 11,465
  • 3
  • 29
  • 33