@@ -247,6 +247,10 class SchainNotify: | |||||
247 |
|
247 | |||
248 | Exceptions: None. |
|
248 | Exceptions: None. | |
249 | """ |
|
249 | """ | |
|
250 | ||||
|
251 | if not self.__emailToAddress: | |||
|
252 | return 0 | |||
|
253 | ||||
250 | print "***** Sending alert to %s *****" %self.__emailToAddress |
|
254 | print "***** Sending alert to %s *****" %self.__emailToAddress | |
251 | # set up message |
|
255 | # set up message | |
252 |
|
256 | |||
@@ -257,9 +261,12 class SchainNotify: | |||||
257 | subtitle=subtitle, |
|
261 | subtitle=subtitle, | |
258 | filename=filename) |
|
262 | filename=filename) | |
259 |
|
263 | |||
260 | if sent: |
|
264 | if not sent: | |
261 | print "***** Your system administrator has been notified *****" |
|
265 | return 0 | |
262 |
|
266 | |||
|
267 | print "***** Your system administrator has been notified *****" | |||
|
268 | ||||
|
269 | return 1 | |||
263 |
|
270 | |||
264 | def notify(self, email, message, subject = "", subtitle="", filename=""): |
|
271 | def notify(self, email, message, subject = "", subtitle="", filename=""): | |
265 | """notify sends an email with the given message and title to email. |
|
272 | """notify sends an email with the given message and title to email. |
General Comments 0
You need to be logged in to leave comments.
Login now