@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
try {
BounceNotification bounce = BounceNotificationParser.parse(req);
// Bounced Raw MimeMessage
MimeProperties mp = new MimeProperties(bounce.getRawMessage());
mp.subject = "BOUNCED:" + mp.subject;
log.info("Bounce Notification - Raw Message: " + mp);
// Original Details
BounceNotification.Details details;
details = bounce.getOriginal();
MimeProperties mpOriginal = new MimeProperties();
mpOriginal.from = details.getFrom();
mpOriginal.to = details.getTo();
mpOriginal.subject = details.getSubject();
mpOriginal.body = details.getText();
log.info("Bounce Notification - Original Info: " + mpOriginal);
// Notification Details
details = bounce.getNotification();
MimeProperties mpNotification = new MimeProperties();
mpNotification.from = details.getFrom();
mpNotification.to = details.getTo();
mpNotification.subject = details.getSubject();
mpNotification.body = details.getText();