Question

In accordance with GAE docs, several handlers could be support for incoming e-mails. I would like to support two:

  1. string@appid.appspotmail.com should go to Handler1;
  2. string+something@appid.appspotmail.com should go to Handler2;

Looks like I should have something like:

- url: /_ah/mail/<???>your_app_id\.appspotmail\.com
  script: handler2.app
  login: admin
- url: /_ah/mail/.+
  script: handler1.app
  login: admin

How the regex (?) should look like to route messages sent to e-mail with plus sign to another handler?

Was it helpful?

Solution

[Updated] The following configuration works for me.

- url: /_ah/mail/string@.*your_app_id\.appspotmail.com
  script: handler2.app
  login: admin
- url: /_ah/mail/string%2B.*@.*your_app_id\.appspotmail.com
  script: handler1.app
  login: admin
- url: /_ah/mail/.+
  script: catchall.app
  login: admin
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top