Package org.nxplanner.mail

Examples of org.nxplanner.mail.EmailMessage


    public void onEvent(int eventType, Integration integration, HttpServletRequest request) {
        if (eventType == INTEGRATION_READY_EVENT) {
            try {
                MessageResources resources = (MessageResources)request.getAttribute(Globals.MESSAGES_KEY);
                EmailMessage email = EmailMessageFactory.createMessage();
                email.setFrom((String)xplannerProperties.get().get("xplanner.mail.from"));
                email.setRecipient(integration.getPersonId());
                email.setCcRecipients((String)xplannerProperties.get().get("xplanner.integration.mail.cc"));
                email.setSubject(resources.getMessage("integrations.notification.subject"));
                String link = request.getScheme() + "://" + request.getServerName() + ":" +
                        request.getServerPort() + request.getContextPath() +
                        "/do/view/integrations?projectId=" + integration.getProjectId();
                email.setBody(resources.getMessage("integrations.notification.text", link));
                email.send();
            } catch (Exception ex) {
                log.error("couldn't send notification", ex);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.nxplanner.mail.EmailMessage

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.