Package org.hoteia.qalingo.core.util.impl

Examples of org.hoteia.qalingo.core.util.impl.MimeMessagePreparatorImpl


            String fromAddress = handleFromAddress(contactEmailBean.getFromAddress(), locale);
            String fromName = handleFromAddress(contactEmailBean.getFromAddress(), locale);
            String toEmail = contactEmailBean.getToEmail();

          MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_CONTACT, model);
          mimeMessagePreparator.setTo(toEmail);
          mimeMessagePreparator.setFrom(fromAddress);
          mimeMessagePreparator.setFromName(fromName);
          mimeMessagePreparator.setReplyTo(fromAddress);
          Object[] parameters = {contactEmailBean.getLastname(), contactEmailBean.getFirstname()};
          mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.contact.email_subject", parameters, locale));
          mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "contact-html-content.vm", model));
          mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "contact-text-content.vm", model));
         
          mimeMessagePreparator.getHtmlContent();
         
          Email email = new Email();
          email.setType(Email.EMAIl_TYPE_CONTACT);
          email.setStatus(Email.EMAIl_STATUS_PENDING);
          saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here


            String fromAddress = handleFromAddress(retailerContactEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(retailerContactEmailBean.getFromName(), locale);
            String toEmail = retailerContactEmailBean.getToEmail();
           
          MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_RETAILER_CONTACT, model);
          mimeMessagePreparator.setTo(toEmail);
          mimeMessagePreparator.setFrom(fromAddress);
          mimeMessagePreparator.setFromName(fromName);
          mimeMessagePreparator.setReplyTo(fromAddress);
          Object[] parameters = {retailerContactEmailBean.getLastname(), retailerContactEmailBean.getFirstname()};
          mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.retailer_contact.email_subject", parameters, locale));
          mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "retailer-contact-html-content.vm", model));
          mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "retailer-contact-text-content.vm", model));
         
          Email email = new Email();
          email.setType(Email.EMAIl_TYPE_RETAILER_CONTACT);
          email.setStatus(Email.EMAIl_STATUS_PENDING);
          saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

          String fromAddress = handleFromAddress(newsletterEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(newsletterEmailBean.getFromName(), locale);
            String toEmail = newsletterEmailBean.getToEmail();
           
          MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_NEWSLETTER_SUBSCRIPTION, model);
          mimeMessagePreparator.setUnsubscribeUrlOrEmail(fullUnsubscribeUrl);
          mimeMessagePreparator.setTo(toEmail);
          mimeMessagePreparator.setFrom(fromAddress);
          mimeMessagePreparator.setFromName(fromName);
          mimeMessagePreparator.setReplyTo(fromAddress);
          Object[] parameters = {};
          mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.newsletter_subscription.email_subject", parameters, locale));
          mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "newsletter-subscription-confirmation-html-content.vm", model));
          mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "newsletter-subscription-confirmation-text-content.vm", model));
         
          Email email = new Email();
          email.setType(Email.EMAIl_TYPE_NEWSLETTER_SUBSCRIPTION);
          email.setStatus(Email.EMAIl_STATUS_PENDING);
          saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

         
          String fromAddress = handleFromAddress(newsletterEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(newsletterEmailBean.getFromName(), locale);
            String toEmail = newsletterEmailBean.getToEmail();
           
          MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_NEWSLETTER_SUBSCRIPTION, model);
//          mimeMessagePreparator.setUnsubscribeUrlOrEmail(fullUnsubscribeUrl);
          mimeMessagePreparator.setTo(toEmail);
          mimeMessagePreparator.setFrom(fromAddress);
          mimeMessagePreparator.setFromName(fromName);
          mimeMessagePreparator.setReplyTo(fromAddress);
          Object[] parameters = {};
          mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.newsletter_unsubscription.email_subject", parameters, locale));
          mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "newsletter-unsubscription-confirmation-html-content.vm", model));
          mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "newsletter-unsubscription-confirmation-text-content.vm", model));
         
          Email email = new Email();
          email.setType(Email.EMAIl_TYPE_NEWSLETTER_SUBSCRIPTION);
          email.setStatus(Email.EMAIl_STATUS_PENDING);
          saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

          String fromAddress = handleFromAddress(customerNewAccountConfirmationEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(customerNewAccountConfirmationEmailBean.getFromName(), locale);
            String toEmail = customerNewAccountConfirmationEmailBean.getToEmail();
           
          MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_NEW_ACCOUNT_CONFIRMATION, model);
          mimeMessagePreparator.setTo(toEmail);
          mimeMessagePreparator.setFrom(fromAddress);
          mimeMessagePreparator.setFromName(fromName);
          mimeMessagePreparator.setReplyTo(fromAddress);
          Object[] parameters = {customerNewAccountConfirmationEmailBean.getLastname(), customerNewAccountConfirmationEmailBean.getFirstname()};
          mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.new_account.email_subject", parameters, locale));
          mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "new-account-confirmation-html-content.vm", model));
          mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "new-account-confirmation-text-content.vm", model));
         
          Email email = new Email();
          email.setType(Email.EMAIl_TYPE_NEW_ACCOUNT_CONFIRMATION);
          email.setStatus(Email.EMAIl_STATUS_PENDING);
          saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

          String fromAddress = handleFromAddress(customerForgottenPasswordEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(customerForgottenPasswordEmailBean.getFromName(), locale);
            String toEmail = customer.getEmail();
           
          MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_FORGOTTEN_PASSWORD, model);
          mimeMessagePreparator.setTo(toEmail);
          mimeMessagePreparator.setFrom(fromAddress);
          mimeMessagePreparator.setFromName(fromName);
          mimeMessagePreparator.setReplyTo(fromAddress);
          Object[] parameters = {customer.getLastname(), customer.getFirstname()};
          mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.forgotten_password.email_subject", parameters, locale));
          mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "forgotten-password-html-content.vm", model));
          mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "forgotten-password-text-content.vm", model));
         
          Email email = new Email();
          email.setType(Email.EMAIl_TYPE_FORGOTTEN_PASSWORD);
          email.setStatus(Email.EMAIl_STATUS_PENDING);
          saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

         
          String fromAddress = handleFromAddress(customerResetPasswordConfirmationEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(customerResetPasswordConfirmationEmailBean.getFromName(), locale);
            String toEmail = customer.getEmail();
           
          MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_RESET_PASSWORD_CONFIRMATION, model);
          mimeMessagePreparator.setTo(toEmail);
          mimeMessagePreparator.setFrom(fromAddress);
          mimeMessagePreparator.setFromName(fromName);
          mimeMessagePreparator.setReplyTo(fromAddress);
          Object[] parameters = {customer.getLastname(), customer.getFirstname()};
          mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.reset_password_confirmation.email_subject", parameters, locale));
          mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "reset-password-confirmation-html-content.vm", model));
          mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "reset-password-confirmation-text-content.vm", model));
         
          Email email = new Email();
          email.setType(Email.EMAIl_TYPE_RESET_PASSWORD_CONFIRMATION);
          email.setStatus(Email.EMAIl_STATUS_PENDING);
          saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

            String fromAddress = handleFromAddress(userNewAccountConfirmationEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(userNewAccountConfirmationEmailBean.getFromName(), locale);
            String toEmail = userNewAccountConfirmationEmailBean.getToEmail();
           
            MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_NEW_ACCOUNT_CONFIRMATION, model);
            mimeMessagePreparator.setTo(toEmail);
            mimeMessagePreparator.setFrom(fromAddress);
            mimeMessagePreparator.setFromName(fromName);
            mimeMessagePreparator.setReplyTo(fromAddress);
            Object[] parameters = {userNewAccountConfirmationEmailBean.getLastname(), userNewAccountConfirmationEmailBean.getFirstname()};
            mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.new_account.email_subject", parameters, locale));
            mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "new-account-confirmation-html-content.vm", model));
            mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "new-account-confirmation-text-content.vm", model));
           
            Email email = new Email();
            email.setType(Email.EMAIl_TYPE_NEW_ACCOUNT_CONFIRMATION);
            email.setStatus(Email.EMAIl_STATUS_PENDING);
            saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

            String fromAddress = handleFromAddress(userForgottenPasswordEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(userForgottenPasswordEmailBean.getFromName(), locale);
            String toEmail = user.getEmail();
           
            MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_FORGOTTEN_PASSWORD, model);
            mimeMessagePreparator.setTo(toEmail);
            mimeMessagePreparator.setFrom(fromAddress);
            mimeMessagePreparator.setFromName(fromName);
            mimeMessagePreparator.setReplyTo(fromAddress);
            Object[] parameters = {user.getLastname(), user.getFirstname()};
            mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.forgotten_password.email_subject", parameters, locale));
            mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "forgotten-password-html-content.vm", model));
            mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "forgotten-password-text-content.vm", model));
           
            Email email = new Email();
            email.setType(Email.EMAIl_TYPE_FORGOTTEN_PASSWORD);
            email.setStatus(Email.EMAIl_STATUS_PENDING);
            saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

           
            String fromAddress = handleFromAddress(userResetPasswordConfirmationEmailBean.getFromAddress(), locale);
            String fromName = handleFromName(userResetPasswordConfirmationEmailBean.getFromName(), locale);
            String toEmail = user.getEmail();
           
            MimeMessagePreparatorImpl mimeMessagePreparator = getMimeMessagePreparator(requestData, Email.EMAIl_TYPE_RESET_PASSWORD_CONFIRMATION, model);
            mimeMessagePreparator.setTo(toEmail);
            mimeMessagePreparator.setFrom(fromAddress);
            mimeMessagePreparator.setFromName(fromName);
            mimeMessagePreparator.setReplyTo(fromAddress);
            Object[] parameters = {user.getLastname(), user.getFirstname()};
            mimeMessagePreparator.setSubject(coreMessageSource.getMessage("email.reset_password_confirmation.email_subject", parameters, locale));
            mimeMessagePreparator.setHtmlContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "reset-password-confirmation-html-content.vm", model));
            mimeMessagePreparator.setPlainTextContent(VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, velocityPath + "reset-password-confirmation-text-content.vm", model));
           
            Email email = new Email();
            email.setType(Email.EMAIl_TYPE_RESET_PASSWORD_CONFIRMATION);
            email.setStatus(Email.EMAIl_STATUS_PENDING);
            saveOrUpdateEmail(email, mimeMessagePreparator);
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.util.impl.MimeMessagePreparatorImpl

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.