Hoff
Hoff

Reputation: 39836

app engine: incoming emails get rejected

I'm trying to get a barebone app engine app to handle incoming email. I've followed the Receiving Email tutorial, and my code is really minimal.

However, when I send an email to say [email protected], Google rejects it before it gets to my app:

Delivery to the following recipient failed permanently:

[email protected]

Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain.

this is my app.yaml

application: myapplication
version: 1
runtime: python27
api_version: 1
threadsafe: false

handlers:
- url: /_ah/mail/.+ 
  script: handle_incoming_email.py 

- url: /.*
  script: myapplication.app

inbound_services:
- mail

and handle_incoming_email.py is taken from the tutorial:

import logging, email
from google.appengine.ext import webapp 
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler 
from google.appengine.ext.webapp.util import run_wsgi_app

class LogSenderHandler(InboundMailHandler):
    def receive(self, mail_message):
        logging.info("Received a message from: " + mail_message.sender)

Any idea why emails are being rejected?

Upvotes: 0

Views: 544

Answers (1)

iMom0
iMom0

Reputation: 12921

It seems that you missed login: admin in the yaml file.

and it's [email protected] not [email protected].

Upvotes: 3

Related Questions