示例#1
0
 def __init__(self,fp=None,seekable=1):
   Message.__init__(self)
   self.submsg = None
   self.modified = False
 ## @var headerchange
 # Provide a headerchange event for integration with Milter.
 #   The headerchange attribute can be assigned a function to be called when
 #   changing headers.  The signature is:
 #   headerchange(msg,name,value) -> None
   self.headerchange = None
示例#2
0
 def __init__(self, recip, sender, subject=None, text=None, lang=None):
     Message.__init__(self)
     charset = None
     if lang is not None:
         charset = Charset(Utils.GetCharSet(lang))
     if text is not None:
         self.set_payload(text, charset)
     if subject is None:
         subject = '(no subject)'
     self['Subject'] = Header(subject, charset, header_name='Subject',
                              errors='replace')
     self['From'] = sender
     if isinstance(recip, ListType):
         self['To'] = COMMASPACE.join(recip)
         self.recips = recip
     else:
         self['To'] = recip
         self.recips = [recip]
示例#3
0
 def __init__(self, recip, sender, subject=None, text=None, lang=None):
     Message.__init__(self)
     charset = None
     if lang is not None:
         charset = Charset(Utils.GetCharSet(lang))
     if text is not None:
         self.set_payload(text, charset)
     if subject is None:
         subject = '(no subject)'
     self['Subject'] = Header(subject,
                              charset,
                              header_name='Subject',
                              errors='replace')
     self['From'] = sender
     if isinstance(recip, ListType):
         self['To'] = COMMASPACE.join(recip)
         self.recips = recip
     else:
         self['To'] = recip
         self.recips = [recip]
示例#4
0
文件: message.py 项目: ArildF/rogie
 def __init__(self):
     Message.__init__(self)