Re: Receiving emails via app

2008-10-27 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,

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

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

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

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

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

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

Receiving emails via app

2008-10-25 Thread umit
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? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google