コード例 #1
0
 def __call__(self):
     sendEmail(self.sender, self.receivers, self.subject, self.message, self.smtpServer, self.smtpPort)
コード例 #2
0
# Construct the email notification
emailSender = readPropertyFromPropertiesFileWithFallback("emailNotificationSenderAddress", scriptGlobals.scriptVarSectionName, parser.options.envprops, scriptGlobals.emailNotificationSenderAddress)
emailRecipients = scriptGlobals.globalNotificationEmailList
emailSubject = "Fireworks Execution Report: " + module.name + "@"+ getCurrentHostname() + " (" + module.friendlyServerName + ")"
emailText = detailedExecutionReportTemplate(scriptGlobals.version,
                                            scriptGlobals.revision,
                                            scriptGlobals.buildDate,
                                            module.name,
                                            parser.options.action, 
                                            getCurrentHostname(),
                                            scriptGlobals.workingDir,
                                            os.getcwd(), 
                                            guid,
                                            fireworksStateFilename,
                                            " ".join(platform.uname()),
                                            getpass.getuser())
  
# Email all required parties
sendEmail(emailSender, 
          emailRecipients,
          emailSubject, 
          emailText,
          scriptGlobals.smtpHost, 
          scriptGlobals.smtpPort)

# Output execution time
log.debug("Total execution time: " + getRoundedTimeDifference(time.time(), startTime, 2) + "s (includes time spent during user prompts)")

# Salute!
log.info("Bye bye! :-)")