@Override
public void init() throws ServletException {
try {
ServletBasedEnvironment env = new ServletBasedEnvironment(this.getServletContext());
ExecutorService pool = Executors.newCachedThreadPool();
DefaultAsyncMailer impl = new DefaultAsyncMailer(pool, new AmazonSESMailer(env));
mailer = new ErrorMailer(impl, env);
} catch (IOException e) {
throw new ServletException("Unable to initialize error servlet", e);
}
}