Show
Ignore:
Timestamp:
05/02/09 16:44:28 (3 years ago)
Author:
John Hampton <pacopablo@…>
Children:
4e17a72f98bff34332fbca7853ac4aa7b854d997
Parents:
4bceacf6b979775083c8623c2906a66e95eefe48
git-committer:
John Hampton <pacopablo@pacopablo.com> / 2009-05-02T16:44:28Z-0700
Message:

Fleshed out framework. Begun implementation of IMAP email data source

File:
1 edited

Legend:

Unmodified
Added
Removed
  • resourcetotrac/resourcetotrac/email/imap.py

    ref235ae rc8845e4  
    6868            self.log.debug('Unable to select messages from server') 
    6969        for x in int(response[DATA]): 
    70             msg = self._parse_message( msg = email.message_from_string(self.cnx.fetch(x, r'(UID RFC822)')[DATA][CONTAINER][MSG]) 
    71             yield (x, parsed_msg) 
     70            msg = self._parse_message( 
     71                        email.message_from_string( 
     72                                self.cnx.fetch(x,  
     73                                    r'(UID RFC822)')[DATA][CONTAINER][MSG] 
     74                        ) 
     75            ) 
     76            yield (x, msg) 
    7277         
    7378 
     
    7883        """ 
    7984         
    80         archive = 'INBOX._archive.%d' % ticket 
     85        msg = self._parse_message( 
     86                    email.message_from_string( 
     87                            self.cnx.fetch(x,  
     88                                r'(UID RFC822)')[DATA][CONTAINER][MSG] 
     89                    ) 
     90        ) 
     91        msg_info = {'type' : msg.get_type(), 'id' : str(msg.get_id()),} 
     92        archive = 'INBOX._archive.%(type)s.%(id)s' % msg_info 
    8193        response = self.cnx.list(archive) 
    8294        if response[RESPONSE] == OK and response[DATA][0] == 'None': 
Note: See TracChangeset for help on using the changeset viewer.