81 ''' |
81 ''' |
82 starts the SMS with message to recipients |
82 starts the SMS with message to recipients |
83 ''' |
83 ''' |
84 if not "sms" in self.features: |
84 if not "sms" in self.features: |
85 raise NotSupportedFeature("sms") |
85 raise NotSupportedFeature("sms") |
86 id = self.jobqueue.newSMS(message,recipients,provider,user=self) |
86 id = self.jobqueue.newSMS(message,recipients,provider,user=self.name) |
87 self.jobs[id]=self.jobqueue[id] |
87 self.jobs[id]=self.jobqueue[id] |
88 return id |
88 return id |
89 |
89 |
90 |
90 |
91 def startFAX(self, subject, fax, recipients, provider="default"): |
91 def startFAX(self, subject, fax, recipients, provider="default"): |
98 |
98 |
99 if type(fax) != list: |
99 if type(fax) != list: |
100 fax=[fax] |
100 fax=[fax] |
101 f=[i.data for i in fax] |
101 f=[i.data for i in fax] |
102 |
102 |
103 id = self.jobqueue.newFAX(subject, f,recipients,provider,user=self) |
103 id = self.jobqueue.newFAX(subject, f,recipients,provider,user=self.name) |
104 self.jobs[id]=self.jobqueue[id] |
104 self.jobs[id]=self.jobqueue[id] |
105 return id |
105 return id |
106 |
106 |
107 def startMail(self, subject, body, recipients, frm, provider="default"): |
107 def startMail(self, subject, body, recipients, frm, provider="default"): |
108 if not "mail" in self.features: |
108 if not "mail" in self.features: |
109 raise NotSupportedFeature("mail") |
109 raise NotSupportedFeature("mail") |
110 logger.debug("startMail(%s,%s,%s,%s,%s)"%(subject, body, recipients, frm, provider)) |
110 logger.debug("startMail(%s,%s,%s,%s,%s)"%(subject, body, recipients, frm, provider)) |
111 id = self.jobqueue.newMail(subject, body, recipients, frm, provider,user=self) |
111 id = self.jobqueue.newMail(subject, body, recipients, frm, provider,user=self.name) |
112 self.jobs[id]=self.jobqueue[id] |
112 self.jobs[id]=self.jobqueue[id] |
113 return id |
113 return id |
114 |
114 |
115 def getProvider(self, name): |
115 def getProvider(self, name): |
116 if not name in self.features: |
116 if not name in self.features: |