+ private static final MailTemplate supportNotification = new MailTemplate(SupportedUser.class.getResource("SupportNotificationMail.templ"));
+
+ public void sendSupportNotification(String subject, Outputable message) {
+ try {
+ HashMap<String, Object> vars = new HashMap<>();
+ vars.put("supporter", supporter.getPreferredName().toString());
+ vars.put("action", message);
+ vars.put("ticket", this.getTicket());
+ vars.put("subject", subject);
+
+ String supportemailaddress = "support@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", "");
+ supportNotification.sendMail(Language.getInstance(Locale.ENGLISH), vars, supportemailaddress);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }