Package com.google.appengine.api.mail

Examples of com.google.appengine.api.mail.BounceNotification


    @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();
View Full Code Here

TOP

Related Classes of com.google.appengine.api.mail.BounceNotification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.