Hi Zeynel,

You don't have to use a separate handler. Simply add ReceiveEmail.mapping()
to the list of handlers your existing script has.

-Nick Johnson

On Sat, Nov 20, 2010 at 4:23 AM, Zeynel <azeyn...@gmail.com> wrote:

> 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 google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

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

Reply via email to