I am trying to receive mail with this handler from cookbook
http://appengine-cookbook.appspot.com/recipe/receive-mail/?id=ahJhcHBlbmdpbmUtY29va2Jvb2tylAELEgtSZWNpcGVJbmRleCI7YWhKaGNIQmxibWRwYm1VdFkyOXZhMkp2YjJ0eUZnc1NDRU5oZEdWbmIzSjVJZ2hOWVdsc0lFRlFTUXcMCxIGUmVjaXBlIjxhaEpoY0hCbGJtZHBibVV0WTI5dmEySnZiMnR5RmdzU0NFTmhkR1ZuYjNKNUlnaE5ZV2xzSUVGUVNRdzEM:
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)
The tutorial creates a separate script
- url: /_ah/mail/.+
script: handle_incoming_email.py
login: admin
to receive mail. Can I use my hw.py script which has sending email
tests in it?
If so, how do I handle
application = webapp.WSGIApplication([
ReceiveEmail.mapping()
], debug=True)
with "application" that I already have in the hw.py script:
application = webapp.WSGIApplication(
[('/', MainPage),
('/sign', Sign),
('/invite',
InviteFriendHandler),
],
debug=True)
Thanks!
--
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.