boolean sendTest(String email) { log.log(Level.INFO, "fgsms SLA Pusher test message"); try { Properties props = SLACommon.LoadSLAPropertiesPooled(); Session mailSession = Session.getDefaultInstance(props); Message simpleMessage = new MimeMessage(mailSession); InternetAddress from; if (Utility.stringIsNullOrEmpty(email)) { from = new InternetAddress(props.getProperty("defaultReplyAddress")); } else { from = new InternetAddress(email); } InternetAddress to = new InternetAddress(email); simpleMessage.setFrom(from); simpleMessage.setRecipient(Message.RecipientType.TO, to); simpleMessage.setSubject("fgsms SLA Processor Test Message"); simpleMessage.setContent("This is a test indicating that your fgsms SLA Processor is configured correctly." + "<br>" + "<a href=\"" + props.getProperty("fgsms.GUI.URL") + "\">fgsms</a>", "text/html; charset=ISO-8859-1"); Transport.send(simpleMessage); return true; } catch (Exception ex) { log.log(Level.ERROR, "Error sending SLA alert email! " + ex.getLocalizedMessage()); } return false; } private static String allitems = "All-Methods";
props = LoadSLAPropertiesPooled(); } else { props = LoadSLAPropertiesNotPooled();
private static void sendMailAlert(String htmlencodedText, String subject, InternetAddress[] subscribers, boolean pooled) { Properties props = null; if (pooled) { props = SLACommon.LoadSLAPropertiesPooled(); } else { props = SLACommon.LoadSLAPropertiesNotPooled();
props = LoadSLAPropertiesPooled(); } else { props = LoadSLAPropertiesNotPooled();
props = LoadSLAPropertiesPooled(); } else { props = LoadSLAPropertiesNotPooled();
public void ProcessNewTransaction(AddDataRequestMsg req, String transactionid) { ServicePolicy pol = SLACommon.LoadPolicyPooled(req.getURI()); Properties props = SLACommon.LoadSLAPropertiesPooled();
private static void SendMailAlert(String htmlencodedTest, SLAAction email, String slaguid, boolean pooled, String policyurl) { Properties props = null; if (pooled) { props = SLACommon.LoadSLAPropertiesPooled(); } else { props = SLACommon.LoadSLAPropertiesNotPooled();