Setting up App Engine to receive email addresses with ids in the address

Posted by Mark M on Stack Overflow See other posts from Stack Overflow or by Mark M
Published on 2010-04-21T17:40:13Z Indexed on 2010/04/21 17:43 UTC
Read the original article Hit count: 182

Filed under:

I am writing an App Engine app that is supposed to receive emails in this form: [email protected] (someID is an alphanumeric ID that I generate).

I have this in my web.xml thinking it would catch emails that start with 'addcontact.':

  <servlet> 
    <servlet-name>addNewContactServlet</servlet-name> 
    <servlet-class>com.mycompany.server.AddNewContactServlet</servlet- 
class> 
  </servlet> 
  <servlet-mapping> 
    <servlet-name>addNewContactServlet</servlet-name> 
    <url-pattern>/_ah/mail/addcontact.*</url-pattern> 
  </servlet-mapping> 

However, both on my dev machine and on google's servers email is not received. On the dev machine I get this message (I get a similar error in the deployed log)

Message send failure HTTP ERROR 404 Problem accessing /_ah/mail/ [email protected]. Reason: NOT_FOUND

I can receive email at fully specified addresses or when I use /_ah/mail/* The google documentation made me believe it was possible to include partial email addresses in web.xml. Am I not using the wildcard correctly? Does the period have something to do with it? Can this be done somehow?

© Stack Overflow or respective owner

Related posts about google-app-engine