On Nov 19, 2:20 pm, Geoffrey Spear <[email protected]> wrote:
> To simulate email in the dev server, you need to use the dashboard 
> athttp://localhost:8081/_ah/admin/

Thanks. I send an email from http://localhost:8081/_ah/admin/inboundmail
but I am confused about how to access the content of the email "text"
in the following script. I created a handle_incoming_email.py script
and put the following handler in it:

class ReceiveEmail(InboundMailHandler):
    def receive(self,message):
        logging.info("Received email from %s" % message.sender)
        plaintext = message.bodies(content_type='text/plain')
        for text in plaintext:
            txtmsg = ""
            txtmsg = text[1].decode()
            logging.info("Body is %s" % txtmsg)
            self.response.out.write(txtmsg)


application = webapp.WSGIApplication([
  ReceiveEmail.mapping()
], debug=True)

I assume that "plaintext" contains the body of the email and it is
decoded into "txtmsg". Correct? How do I access this "txtmsg"?

Thanks again.

-- 
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