>Every day i did received a email (gmail) with a file attached (text) as rar. >My question is how i can read this file attached from web2py?
Try this (this recipe is for the last adapter modifications in trunk): # Connect to the IMAP service with web2py # For Gmail the connection string should be # "imap://youracco...@gmail.com:passw...@imap.gmail.com:993" imapdb = DAL("imap://account@domain:password@imapserver:port", pool_size=1) # To fetch today's emails from a given sender: # Note: your mailbox can have a different name. # The complete mailbox tablenames can be retrieved with imapdb.tables() # The actual mailbox name is in imapdb.TABLE.mailbox emails = imapdb((imapdb.INBOX.created>=request.now.date())&\ (imapdb.INBOX.sender.contains("sender@mail.account"))).select() # Loop for processing any mail attachments for email in emails: # The email attachments (if any) are accessible with # email.attachments (a list with the attachment data ... --