Package org.focusns.common.mail.config

Examples of org.focusns.common.mail.config.MailConfig


    }

    @Override
    public void send(String messageId, String[] to, Map<String, Object> context) {
        try {
            MailConfig mailConfig = mailFactory.find(messageId);
            if(to!=null) { // override default config
                mailConfig.setTo(to);
            }
            MimeMessage message = prepareMessage(mailConfig, context);
            //
            mailSender.send(message);
            //
View Full Code Here


            String subject = DomUtils.getTextValue(subjectEle).trim();
            // content
            Element contentEle = DomUtils.getChildElementByTagName(messageEle, "content");
            String content = DomUtils.getTextValue(contentEle).trim();
            //
            MailConfig mailConfig = new MailConfig();
            mailConfig.setMessageId(messageId);
            mailConfig.setFrom(from);
            mailConfig.setTo(toArray);
            mailConfig.setCc(ccArray);
            mailConfig.setSubject(subject);
            mailConfig.setContent(content);
            //
            mailConfigHolder.add(mailConfig);
        }
    }
View Full Code Here

TOP

Related Classes of org.focusns.common.mail.config.MailConfig

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.