Hello Can somebody direct me to solution how to receiving and handle emails inside Django app on App engine standard?
First place where I start was: https://cloud.google.com/appengine/docs/standard/python/mail/receiving-mail-with-mail-api All is working fine for webapp2 but I would like to handle it with Django view, cause rest of application is in Django. When I use in app.yaml inbound_services: - mail - url: /_ah/mail/.+ script: myapp.views.handle_email login: admin the handle_email function get two arguments. First is type Dict with this content 'wsgi.input': <cStringIO.StringI object at 0x7f0524277938>, 'PATH_INFO': '/_ah/mail/[email protected]', 'wsgi.multiprocess': True, 'USER_EMAIL': '', 'wsgi.errors': <google.appengine.api.logservice.logservice._LogsStreamBuffer object at 0x7f0525c73090>, 'REQUEST_ID_HASH': 'B4788AA9', 'wsgi.run_once': False, 'TZ': 'UTC', 'APPLICATION_ID': 'dev~myproject', 'HTTP_CONTENT_LENGTH': '676', 'USER_IS_ADMIN': '0', 'HTTP_CONTENT_TYPE': 'message/rfc822', 'HTTPS': 'off', 'wsgi.url_scheme': 'http', 'SERVER_PROTOCOL': 'HTTP/1.1', 'DEFAULT_VERSION_HOSTNAME': 'localhost:8080', 'AUTH_DOMAIN': 'gmail.com', 'HTTP_X_APPENGINE_COUNTRY': 'ZZ', 'QUERY_STRING': '', 'PATH_TRANSLATED': '/mywork/googlecloud/myproject/myapp/views.py', 'INSTANCE_ID': '46aadbcae55fddddb13fdedbsfdsfdsdsadsa', 'REMOTE_ADDR': '0.1.0.20', 'USER_ID': '', 'REQUEST_METHOD': 'POST', 'USER_ORGANIZATION': '', 'SERVER_PORT': '8080', 'CONTENT_LENGTH': '676', 'REQUEST_LOG_ID': '9fe3f972f494b37acc49aa11c7e5abe4bcbada8d', 'SCRIPT_NAME': '', 'HTTP_HOST': 'localhost:8080', 'CONTENT_TYPE': 'message/rfc822', 'APPENGINE_RUNTIME': 'python27', 'SERVER_NAME': 'localhost', 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'CURRENT_VERSION_ID': '47.190328127403515824', 'CURRENT_MODULE_ID': 'default', 'USER_NICKNAME': '', 'SERVER_SOFTWARE': 'Development/2.0', 'DATACENTER': 'us1' the second is type instancemethod with '<bound method WsgiRequest._StartResponse of <google.appengine.runtime.wsgi.WsgiRequest object at 0x7f0525c732d0>>' It is possible to use InboundMailHandler with this data? How to use InboundMailHandler.mapping() ? Final goal for me is to read data from attachement. Nice day for all of you. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/fa83be8b-7504-4020-8526-278f32a0b208%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
