* @see org.hoteia.qalingo.core.service.EmailService#saveAndBuildNewsletterSubscriptionnConfirmationMail(Localization localization, Customer customer, String velocityPath, NewsletterEmailBean newsletterEmailBean)
*/
public void saveAndBuildNewsletterSubscriptionnConfirmationMail(final RequestData requestData, final String velocityPath,
final NewsletterEmailBean newsletterEmailBean) throws Exception {
try {
final MarketArea marketArea = requestData.getMarketArea();
final Localization localization = requestData.getMarketAreaLocalization();
final Locale locale = localization.getLocale();
// SANITY CHECK
checkEmailAddresses(newsletterEmailBean);
Map<String, Object> model = new HashMap<String, Object>();
DateFormat dateFormatter = DateFormat.getDateInstance(DateFormat.FULL, locale);
java.sql.Timestamp currentDate = new java.sql.Timestamp((new java.util.Date()).getTime());
model.put(CURRENT_DATE, dateFormatter.format(currentDate));
model.put("newsletterEmailBean", newsletterEmailBean);
model.put(WORDING, coreMessageSource.loadWording(Email.WORDING_SCOPE_EMAIL, locale));
Map<String, String> urlParams = new HashMap<String, String>();
urlParams.put(RequestConstants.REQUEST_PARAMETER_NEWSLETTER_EMAIL, URLEncoder.encode(newsletterEmailBean.getToEmail(), Constants.ANSI));
urlParams.put(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CODE, marketArea.getCode());
String unsubscribeUrl = urlService.generateUrl(FoUrls.NEWSLETTER_UNREGISTER, requestData, urlParams);
String fullUnsubscribeUrl = urlService.buildAbsoluteUrl(requestData, unsubscribeUrl);
model.put("unsubscribeUrlOrEmail", fullUnsubscribeUrl);