LA_
LA_

Reputation: 20409

How to support different handlers for incoming GAE e-mails?

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

  1. [email protected] should go to Handler1;
  2. [email protected] 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?

Upvotes: 2

Views: 105

Answers (1)

Takashi Matsuo
Takashi Matsuo

Reputation: 3436

[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

Upvotes: 4

Related Questions