this.env = env;
}
public ErrorMail build() throws EmailException {
Throwable t = (Throwable) req.getAttribute(EXCEPTION);
if(t == null) throw new EmailException("Cannot send exception email without exception");
String referer = (String) req.getAttribute(REQUEST_URI);
Object user = req.getAttribute(CURRENT_USER);
String queryString = "";
if (req.getMethod().equals("GET")){
queryString = (String) req.getAttribute(REQUEST_PARAMETERS);
}
if (!env.has(TARGET_MAILING_LIST)) {
throw new EmailException(noMailingListMessage());
}
String mailingList = env.get(TARGET_MAILING_LIST);
String from = env.get(SIMPLE_MAIL_FROM);
String fromName = env.get(SIMPLE_MAIL_FROM_NAME);
String headers = getHeaders();