43 def getAttachment(self,i): |
43 def getAttachment(self,i): |
44 print self.attachments |
44 print self.attachments |
45 return self.attachments[i] |
45 return self.attachments[i] |
46 |
46 |
47 class Mail(content): |
47 class Mail(content): |
48 def __init__(self, subject, body): |
48 def __init__(self, subject, body, frm): |
49 con=MIMEText(body.encode("utf-8"), _charset='utf-8') |
49 con=MIMEText(body.encode("utf-8"), _charset='utf-8') |
50 sub=Header(subject.encode('utf-8'), 'utf-8') |
50 sub=Header(subject.encode('utf-8'), 'utf-8') |
51 con['Subject']=sub |
51 con['Subject']=sub |
|
52 self.frm=frm |
52 content.__init__(self, con) |
53 content.__init__(self, con) |
53 |
54 |
54 def sendto(self,anbieter,recipients): |
55 def sendto(self,anbieter,recipients): |
55 anbieter.sendMail(self,recipients) |
56 anbieter.sendMail(self,recipients) |
56 |
57 |
57 def as_string(self): |
58 def as_string(self): |
58 return self.content.as_string() |
59 return self.content.as_string() |
59 |
60 |
|
61 def getFrom(self): |
|
62 return self.frm |