Re: receiving emails

2009-04-03 Thread Rajesh D
On Apr 3, 2:48 pm, El Marto wrote: > Hi all > > I m working on a web project that also interacts with users through > email. I can send emails through SMTP, but I dont know how to receive > emails and process them in a django. > > Does someone know how to do this? Use Python's built-in support

Re: Receiving emails via app

2008-10-26 Thread Jeff Anderson
James Bennett wrote: > On Sat, Oct 25, 2008 at 2:09 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > >> We have an alias set up in postfix that sends the e-mail to our script >> via a pipe. >> >> The python script imports our Django models, and parses the e-mail >> message with the email module, a

Re: Receiving emails via app

2008-10-26 Thread Steve Holden
felix wrote: > In general I agree with Jeff's suggestion. > > but OTOH you might be able to get pop to work > and using the pop interface maybe you can get the headers in a clean > pythonic fashion. > > it sounds like you will also have to deal with attachments, so maybe > the pop library can ha

Re: Receiving emails via app

2008-10-26 Thread James Bennett
On Sat, Oct 25, 2008 at 2:09 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > We have an alias set up in postfix that sends the e-mail to our script > via a pipe. > > The python script imports our Django models, and parses the e-mail > message with the email module, and does what it needs to. You c

Re: Receiving emails via app

2008-10-26 Thread Jeff Anderson
AndyB wrote: > This sounds like exactly what I need to do. However my Unix-fu isn't > up to coping with the sentence 'We have an alias set up in postfix > that sends the e-mail to our script via a pipe.'... :( > > My naive assumption is that one could use something like poplib in the > standard lib

Re: Receiving emails via app

2008-10-26 Thread Doug B
poplib is pretty easy to work with: def check_pop3(server,user,password): import email,poplib,string messages=[] s=poplib.POP3(server) s.user(user) s.pass_(password) resp, items, octets = s.list() todelete=[] for item in items: id,size=item.split()

Re: Receiving emails via app

2008-10-26 Thread felix
In general I agree with Jeff's suggestion. but OTOH you might be able to get pop to work and using the pop interface maybe you can get the headers in a clean pythonic fashion. it sounds like you will also have to deal with attachments, so maybe the pop library can handle that nicely. the script

Re: Receiving emails via app

2008-10-26 Thread AndyB
This sounds like exactly what I need to do. However my Unix-fu isn't up to coping with the sentence 'We have an alias set up in postfix that sends the e-mail to our script via a pipe.'... :( My naive assumption is that one could use something like poplib in the standard library to connect to a PO

Re: Receiving emails via app

2008-10-25 Thread Jeff Anderson
umit wrote: > Hi, i am trying to build a quick blog system. But i want users can > send emails to submit messages with pictures. > How can i receive emails and process them? What should i use? > We use Python's email module. We have an alias set up in postfix that sends the e-mail to our script