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