Package com.jada.util

Examples of com.jada.util.Mailer$MyAuthenticator


            return actionForward;
        }
        Customer customer = (Customer) list.get(0);
       
         MessageResources resources = this.getResources(request);
        Mailer mailer = new Mailer(site);
        SiteDomain siteDomain = contentBean.getContentSessionBean().getSiteDomain();
        SiteDomainLanguage siteDomainLanguage = null;
        for (SiteDomainLanguage language : siteDomain.getSiteDomainLanguages()) {
          if (language.getSiteProfileClass().getSiteProfileClassId().equals(contentBean.getContentSessionKey().getSiteProfileClassId())) {
            siteDomainLanguage = language;
            break;
         
        }
        SiteDomainParamBean siteDomainParamBean = SiteDomainDAO.getSiteDomainParamBean(siteDomain.getSiteDomainLanguage(), siteDomainLanguage);
        String mailFrom = siteDomainParamBean.getMailFromPwdReset();
        String subject = siteDomainParamBean.getSubjectPwdReset();
        String body = resources.getMessage("message.mail.pwdReset.body", AESEncoder.getInstance().decode(customer.getCustPassword()));
        if (mailFrom == null) {
          mailFrom = "";
        }
        if (subject == null) {
          subject = "";
        }
       
        try {
          mailer.sendMail(mailFrom, form.getCustEmail(), subject, body);
        }
        catch (MessagingException e) {
          messages.add("forgot", new ActionMessage("content.error.mail.send"));
      saveMessages(request, messages);
            ActionForward actionForward = actionMapping.findForward("error");
View Full Code Here


        String value = (String) request.getParameter(name);
        content += name + ": " + value + "\n";
      }
     
      MessageResources resources = this.getResources(request);
        Mailer mailer = new Mailer(site);
        ContentBean contentBean = getContentBean(request);
      SiteDomainLanguage siteDomainLanguage = null;
      for (SiteDomainLanguage language : contentBean.getContentSessionBean().getSiteDomain().getSiteDomainLanguages()) {
        if (language.getSiteProfileClass().getSiteProfileClassId().equals(contentBean.getContentSessionKey().getSiteProfileClassId())) {
          siteDomainLanguage = language;
          break;
        }
      }
      SiteDomainParamBean siteDomainParamBean = SiteDomainDAO.getSiteDomainParamBean(contentBean.getContentSessionBean().getSiteDomain().getSiteDomainLanguage(), siteDomainLanguage);
        String mailFrom = siteDomainParamBean.getMailFromContactUs();
    ContentSessionBean contentSessionBean = contentBean.getContentSessionBean();
        if (email == null) {
          logger.error("email address value is null and email may not be sent");
            ActionForward forward = actionMapping.findForward("error") ;
            forward = new ActionForward(forward.getPath() +
                      contentSessionBean.getSiteDomain().getSiteDomainPrefix() + "/" +
                          contentSessionBean.getSiteProfile().getSiteProfileClass().getSiteProfileClassName() + "/" +
                          "contactus?message=content.text.contactUs.error",
                          forward.getRedirect());
            return forward;
        }
        String subject = resources.getMessage("content.text.contactUs");
logger.error("mailFrom > " + mailFrom);
logger.error("email > " + email);
logger.error("subject > " + subject);
logger.error("content > " + content);
        mailer.sendMail(mailFrom, email, subject, content);
       
        ActionForward forward = actionMapping.findForward("success") ;
        forward = new ActionForward(forward.getPath() +
                  contentSessionBean.getSiteDomain().getSiteDomainPrefix() + "/" +
                      contentSessionBean.getSiteProfile().getSiteProfileClass().getSiteProfileClassName() + "/" +
View Full Code Here

    TemplateEngine engine = TemplateEngine.getInstance();
    engine.init(request, servletContext, true);
    engine.setParameter("orderHeaderId", orderHeader.getOrderHeaderId());
    String body = engine.mergeData("mail/custSaleConfirmation.vm", "template", engine);
        Mailer mailer = new Mailer(site);

        String mailFrom = siteDomainParamBean.getMailFromCustSales();
        String subject = siteDomainParamBean.getSubjectCustSales();
        String mailTo = orderHeader.getCustEmail();
        if (mailFrom == null) {
          mailFrom = "";
        }
        if (subject == null) {
          subject = "";
        }
        if (Format.isNullOrEmpty(mailFrom) || Format.isNullOrEmpty(mailTo)) {
          logger.error("Unable to send customer sales email");
          logger.error("mailFrom = " + mailFrom);
          logger.error("mailTo = " + mailTo);
          logger.error("subject = " + subject);
        }
        mailer.sendMail(mailFrom, mailTo, subject, body, "text/html");
       
    body = engine.mergeData("mail/adminSaleNotification.vm", "template", engine);
    mailTo = siteDomainParamBean.getCheckoutNotificationEmail();
        mailFrom = siteDomainParamBean.getMailFromNotification();
        subject = siteDomainParamBean.getSubjectNotification();
        if (!Format.isNullOrEmpty(mailFrom) && !Format.isNullOrEmpty(mailTo)) {
          mailer.sendMail(mailFrom, mailTo, subject, body, "text/html");
        }
  }
View Full Code Here

          orderHeader.getSiteProfile(),
          orderHeader.getSiteCurrency(),
          servletContext);
    engine.setParameter("orderHeaderId", orderHeader.getOrderHeaderId());
    String body = engine.mergeData("mail/shippingQuote.vm", "template", engine);
        Mailer mailer = new Mailer(site);

        String mailFrom = siteDomainParamBean.getMailFromShippingQuote();
        String subject = siteDomainParamBean.getSubjectShippingQuote();
        String mailTo = orderHeader.getCustEmail();
        if (mailFrom == null) {
          mailFrom = "";
        }
        if (subject == null) {
          subject = "";
        }
        if (Format.isNullOrEmpty(mailFrom) || Format.isNullOrEmpty(mailTo)) {
          logger.error("Unable to send customer sales email");
          logger.error("mailFrom = " + mailFrom);
          logger.error("mailTo = " + mailTo);
          logger.error("subject = " + subject);
        }
        mailer.sendMail(mailFrom, mailTo, subject, body, "text/html");
  }
View Full Code Here

TOP

Related Classes of com.jada.util.Mailer$MyAuthenticator

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.