Package org.broadleafcommerce.common.email.domain

Examples of org.broadleafcommerce.common.email.domain.EmailTarget


    public abstract String buildMessageBody(EmailInfo info, Map<String,Object> props);
   
    public MimeMessagePreparator buildMimeMessagePreparator(final Map<String,Object> props) {
         MimeMessagePreparator preparator = new MimeMessagePreparator() {
             public void prepare(MimeMessage mimeMessage) throws Exception {
                 EmailTarget emailUser = (EmailTarget) props.get(EmailPropertyType.USER.getType());
                 EmailInfo info = (EmailInfo) props.get(EmailPropertyType.INFO.getType());
                 MimeMessageHelper message = new MimeMessageHelper(mimeMessage, (info.getAttachments() != null && info.getAttachments().size() > 0));
                 message.setTo(emailUser.getEmailAddress());
                 message.setFrom(info.getFromAddress());
                 message.setSubject(info.getSubject());
                 if (emailUser.getBCCAddresses() != null && emailUser.getBCCAddresses().length > 0) {
                     message.setBcc(emailUser.getBCCAddresses());
                 }
                 if (emailUser.getCCAddresses() != null && emailUser.getCCAddresses().length > 0) {
                     message.setCc(emailUser.getCCAddresses());
                 }
                 String messageBody = info.getMessageBody();
                 if (messageBody == null) {                 
                     messageBody = buildMessageBody(info, props);
                 }
View Full Code Here


        return tracking.getId();
    }

    public EmailTarget createTarget() {
        EmailTarget target = (EmailTarget) entityConfiguration.createEntityInstance("org.broadleafcommerce.common.email.domain.EmailTarget");
        return target;
    }
View Full Code Here

        return sendBasicEmail(emailInfo, emailTarget, props);
    }

    public boolean sendTemplateEmail(String emailAddress, EmailInfo emailInfo, Map<String, Object> props) {
        if (!(emailInfo instanceof NullEmailInfo)) {
            EmailTarget emailTarget = emailReportingDao.createTarget();
            emailTarget.setEmailAddress(emailAddress);
            return sendTemplateEmail(emailTarget, emailInfo, props);
        } else {
            return true;
        }
    }
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.common.email.domain.EmailTarget

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.