Are you sure you are not receiving it? Or is it more that your app
isn't persisting it?

I had a similar issue with one of my apps and discovered that I wasn't
parsing the mime encoding properly in order to persist it, and didn't
have enough error trapping on the basic email fields.

I would suggest writing debug statements for all the fields you are
trying to take from the email and check if they are being filled
correctly.

Initially I was able to receive from gmail but not hotmail or work.

In my case I was not processing the mime properly and was not using
the correct 'from' field

This is the basics of my Email class, which I create from my
ReceiveEmailServlet. It doesn't cover the mime encoding, but first
check if you are having issues with the basic fields.

        public Email(MimeMessage message) {
                super();

                _log.info("get main sender");

                if(message==null){
                        _log.info("message was null");
                }

                try {
                        Address[] froms = message.getFrom();
                        if(froms.length>=1){
                                 // just get the first from name, if there are 
more then tough
                                 Address from = froms[0];
                                 this.from = from.toString();
                                 _log.info(this.from);
                        }
                } catch (Exception e) {
                        e.printStackTrace();
                }

                _log.info("get main recipient");
                try {
                         Address[] recipients =
message.getRecipients(Message.RecipientType.TO);
                         if(recipients.length>=1){
                                 // just get the first to name, if there are 
more then tough
                                 Address to = recipients[0];
                                 this.to = to.toString().split("@")[0];
                                 _log.info(this.to);
                }
                } catch (Exception e1) {
                        e1.printStackTrace();
                }

                _log.info("get subject");
                try {
                        this.subject = message.getSubject();
                        _log.info(this.subject);
                } catch (Exception e) {
                        e.printStackTrace();
                }

                _log.info("set received date");
                try {
                        this.receivedDateTime = DateHelper.now();
                        
_log.info(DateHelper.dateAsString(this.receivedDateTime));
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to