Exemplo n.º 1
0
 def __init__(self,
              _subtype='mixed',
              boundary=None,
              _subparts=None,
              encoding=None,
              **_params):
     self.encoding = encoding
     MIMEMultipart.__init__(self, _subtype, boundary, _subparts, **_params)
Exemplo n.º 2
0
 def __init__(self, fromaddr, toaddr, subject, body):
     MIMEMultipart.__init__(self)
     self['From'] = fromaddr
     self['To'] = toaddr
     self['Subject'] = subject
     text_part = MIMEBase('text', 'plain')
     text_part.set_payload(body)
     self.attach(text_part)
Exemplo n.º 3
0
    def __init__(self, From, To, Subject, Body, Reports=()):
        MIMEMultipart.__init__(self)
        self['Date'] =  email.Utils.formatdate(localtime = True)
        self['From'] = From
        self['To'] = To
        self['Subject'] = Subject
        self.preamble = 'This is a MIME Message\r\n'
        self.epilogue = '\r\n'
        self.attach(MIMEText(Body))
        for attachment in Reports:
            report = file(attachment, 'rt').read()
            part = MIMEText(report)
            reprot = None

            part.add_header('Content-Disposition', 'attachment',
                        filename='report.txt')
            self.attach(part)
Exemplo n.º 4
0
 def __init__(self, _subtype='mixed', boundary=None, _subparts=None, encoding=None, **_params):
     self.encoding = encoding
     MIMEMultipart.__init__(self, _subtype, boundary, _subparts, **_params)
Exemplo n.º 5
0
 def __init__(self, boundary=None, **_params):
     MIMEMultipart.__init__(self, 'form-data', boundary, **_params)
	def __init__(self):
		MIMEMultipart.__init__(self, "form-data")
		self.epilogue = ""
Exemplo n.º 7
0
 def __init__(self):
     MIMEMultipart.__init__(self, "form-data")
     self.set_param("boundary", "========== bounda r y 930 ")
     self.epilogue = ""
Exemplo n.º 8
0
 def __init__(self,mt,mfrom,mto,_subtype='mixed',boundary=None):
     MIMEMultipart.__init__(self,_subtype,boundary)
     self.mfrom = mfrom
     self.mto = mto
     self.mt = mt
Exemplo n.º 9
0
 def __init__(self, mt, mfrom, mto, _subtype='mixed', boundary=None):
     MIMEMultipart.__init__(self, _subtype, boundary)
     self.mfrom = mfrom
     self.mto = mto
     self.mt = mt