3 from PLC.Method import Method
4 from PLC.Parameter import Parameter, Mixed
5 from PLC.Auth import Auth
6 from PLC.sendmail import sendmail
8 class NotifySupport(Method):
10 Sends an e-mail message to the configured support address.
12 Returns 1 if successful.
19 Parameter(str, "E-mail subject"),
20 Parameter(str, "E-mail body")
23 returns = Parameter(int, '1 if successful')
25 def call(self, auth, subject, body):
26 to_name="%s Support"%self.api.config.PLC_NAME
27 to_address=self.api.config.PLC_MAIL_SUPPORT_ADDRESS
30 sendmail(self.api, To=(to_name,to_address),
35 #self.event_objects = {'Person': [person['person_id'] for person in persons]}
36 self.message = subject