iro/anbieter/sipgate.py
changeset 59 642098115855
parent 37 6e5bd561ddd0
child 64 7d4ddab659ad
equal deleted inserted replaced
58:fb161058bcab 59:642098115855
    51         self.__send(args,recipients)
    51         self.__send(args,recipients)
    52 
    52 
    53     def sendFAX(self,fax,recipients):
    53     def sendFAX(self,fax,recipients):
    54         """send the PDF file $fax  to $recipients"""
    54         """send the PDF file $fax  to $recipients"""
    55         logger.debug('sipgate.sendFAX(%s,%s)'%(fax,  str(recipients)))
    55         logger.debug('sipgate.sendFAX(%s,%s)'%(fax,  str(recipients)))
    56         pdf=open(fax.attachments[0],"rb")
    56         logger.debug(fax.getAttachment(0));
       
    57         pdf=open(fax.getAttachment(0),"rb")
    57         args={
    58         args={
    58                 "TOS" : "fax",
    59                 "TOS" : "fax",
    59                 "Content" : base64.encodestring(pdf.read())
    60                 "Content" : base64.encodestring(pdf.read())
    60                 }
    61                 }
    61         pdf.close()
    62         pdf.close()