Package pl.net.bluesoft.rnd.processtool.template

Examples of pl.net.bluesoft.rnd.processtool.template.ProcessToolNotificationTemplate


    public void processEmail(String templateName, Map dataModel, String recipient, final Properties mailProperties, boolean sendHtml)
            throws IOException, TemplateException, MessagingException {
        refreshTemplates();
        String body = processTemplate(templateName, dataModel);
        String subject = processTemplate(templateName + getSubjectSuffix(), dataModel);
        ProcessToolNotificationTemplate template = templateMap.get(templateName);
        Session mailSession = Session.getDefaultInstance(mailProperties, new Authenticator() {
            protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(mailProperties.getProperty("mail.smtp.user"), mailProperties.getProperty("mail.smtp.password"));
            }
        });
        sendEmail(recipient, template.getSender(), subject, body, sendHtml, mailSession);
    }
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.template.ProcessToolNotificationTemplate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.