I'm testing incoming email URLs in a new app and am stumped why they work in the dev server but not in the live app. My app files are:
import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.write('Hello, World!')
class MailHandler(InboundMailHandler):
def receive(self, msg):
logging.info("Received a message from: %s, subject: %s", msg.sender, msg.subject)
app = webapp2.WSGIApplication([
('/_ah/mail/', MailHandler),
('/', MainPage),
], debug=True)
The expected log message is printed by the dev server when I "send" a test email using the dev admin web interface, but when I send an email to the live app (i.e.,
te...@myappid.appspotmail.com), it logs a 404 in the log and returns a bounce message saying "Delivery to the following recipient failed permanently". Any ideas?