问题
In accordance with GAE docs, several handlers could be support for incoming e-mails. I would like to support two:
- string@appid.appspotmail.com should go to Handler1;
- 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?
回答1:
[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
来源:https://stackoverflow.com/questions/15453142/how-to-support-different-handlers-for-incoming-gae-e-mails