iro/anbieter/content.py
changeset 57 97ef6ca145e6
parent 30 5253631a8dd3
child 58 fb161058bcab
equal deleted inserted replaced
56:3718abbfffd6 57:97ef6ca145e6
    23 
    23 
    24     def getContent(self):
    24     def getContent(self):
    25         return self.content
    25         return self.content
    26 
    26 
    27 class SMS(content):
    27 class SMS(content):
    28 	def __init__(self,cont):
    28     def __init__(self, cont):
    29 		content.__init__(self,cont)
    29         content.__init__(self,cont)
    30 		
    30 
    31 	def sendto(self,anbieter,recipients):
    31     def sendto(self,anbieter,recipients):
    32 		anbieter.sendSMS(self,recipients)
    32         anbieter.sendSMS(self,recipients)
    33 
    33 
    34 class FAX(content):
    34 class FAX(content):
    35 	def __init__(self,header,cont,attachments):
    35     def __init__(self,header,cont,attachments):
    36 		content.__init__(self,cont)
    36         content.__init__(self,cont)
    37 		self.header=header
    37         self.header=header
    38 		self.attachments=attachments
    38         self.attachments=attachments
    39 		
    39 
    40 	def sendto(self,anbieter,recipients):
    40     def sendto(self,anbieter,recipients):
    41 		anbieter.sendFAX(self,recipients)
    41         anbieter.sendFAX(self,recipients)
       
    42 
       
    43     def getAttachment(self,i):
       
    44         print self.attachments
       
    45         return self.attachments[i]
    42 
    46 
    43 class Mail(content):
    47 class Mail(content):
    44     def __init__(self, subject, body):
    48     def __init__(self, subject, body):
    45         con=MIMEText(body.encode("utf-8"), _charset='utf-8')
    49         con=MIMEText(body.encode("utf-8"), _charset='utf-8')
    46         sub=Header(subject.encode('utf-8'), 'utf-8')
    50         sub=Header(subject.encode('utf-8'), 'utf-8')