56 except: |
56 except: |
57 raise String("No Job with ID: %i" %(id)) |
57 raise String("No Job with ID: %i" %(id)) |
58 job.stop() |
58 job.stop() |
59 |
59 |
60 |
60 |
61 def startSMS(self,message,recipients): |
61 def startSMS(self,message,recipients,provider="default"): |
62 ''' |
62 ''' |
63 starts the SMS with message to recipients |
63 starts the SMS with message to recipients |
64 ''' |
64 ''' |
65 if not "sms" in self.features: |
65 if not "sms" in self.features: |
66 raise NotSupportedFeature("sms") |
66 raise NotSupportedFeature("sms") |
67 id = self.jobqueue.newSMS(message,recipients) |
67 id = self.jobqueue.newSMS(message,recipients,provider) |
68 self.jobs[id]=self.jobqueue[id] |
68 self.jobs[id]=self.jobqueue[id] |
69 return id |
69 return id |
70 |
70 |
71 |
71 |
72 def startFAX(self): |
72 def startFAX(self,provider="default"): |
73 ''' |
73 ''' |
74 starts the FAX - not implemented |
74 starts the FAX - not implemented |
75 ''' |
75 ''' |
76 raise NotSupportedFeature("fax") |
76 raise NotSupportedFeature("fax") |
77 |
77 |
78 |
78 |
79 |
79 |
80 def startMail(self,subject, body , recipients): |
80 def startMail(self,subject, body , recipients,provider="default"): |
81 if not "mail" in self.features: |
81 if not "mail" in self.features: |
82 raise NotSupportedFeature("mail") |
82 raise NotSupportedFeature("mail") |
83 id = self.jobqueue.newMail(subject, body ,recipients) |
83 id = self.jobqueue.newMail(subject, body ,recipients,provider) |
84 self.jobs[id]=self.jobqueue[id] |
84 self.jobs[id]=self.jobqueue[id] |
85 return id |
85 return id |
86 |
86 |
87 def getProvider(self, name): |
87 def getProvider(self, name): |
88 if not name in self.features: |
88 if not name in self.features: |