Esempio n. 1
0
 def subject(self):
     """
     Returns the message subject, if it exists.
     """
     try:
         return self._subject
     except AttributeError:
         self._subject = encode(self._getStringStream('__substg1.0_0037'))
         return self._subject
Esempio n. 2
0
 def subject(self):
     """
     Returns the message subject, if it exists.
     """
     try:
         return self._subject
     except AttributeError:
         self._subject = encode(self._getStringStream('__substg1.0_0037'))
         return self._subject
Esempio n. 3
0
 def body(self):
     """
     Returns the message body, if it exists.
     """
     try:
         return self._body
     except AttributeError:
         self._body = self._getStringStream('__substg1.0_1000')
         if self._body:
             # found some bodies to contain Windows-1252 encoded chars
             try:
                 self._body = encode(self._body)
             except UnicodeDecodeError:
                 self._body = (self._body).decode('cp1252')
                 self._body = encode(self._body)
             a = re.search('\n', self._body)
             if a is not None:
                 if re.search('\r\n', self._body) is not None:
                     self.__crlf = '\r\n'
         return self._body
Esempio n. 4
0
 def body(self):
     """
     Returns the message body, if it exists.
     """
     try:
         return self._body
     except AttributeError:
         self._body = encode(self._getStringStream('__substg1.0_1000'))
         a = re.search('\n', self._body)
         if a != None:
             if re.search('\r\n', self._body) != None:
                 self.__crlf = '\r\n'
         return self._body
Esempio n. 5
0
 def body(self):
     """
     Returns the message body, if it exists.
     """
     try:
         return self._body
     except AttributeError:
         self._body = self._getStringStream('__substg1.0_1000')
         if self._body:
             self._body = encode(self._body)
             a = re.search('\n', self._body)
             if a is not None:
                 if re.search('\r\n', self._body) is not None:
                     self.__crlf = '\r\n'
         return self._body
Esempio n. 6
0
 def body(self):
     """
     Returns the message body, if it exists.
     """
     try:
         return self._body
     except AttributeError:
         self._body = self._getStringStream('__substg1.0_1000')
         try:
             enc = chardet.detect(self._body)["encoding"]
             self._body = self._body.decode(enc)
         except AttributeError:
             pass
         except TypeError:
             pass
         if self._body:
             self._body = encode(self._body)
             a = re.search('\n', self._body)
             if a is not None:
                 if re.search('\r\n', self._body) is not None:
                     self.__crlf = '\r\n'
         return self._body