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() + "/" +