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