如何为传入的GAE电子邮件支持不同的处理程序? [英] How to support different handlers for incoming GAE e-mails?
本文介绍了如何为传入的GAE电子邮件支持不同的处理程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据 GAE文档,可以支持几个处理程序传入的电子邮件。我想支持两个:
In accordance with GAE docs, several handlers could be support for incoming e-mails. I would like to support two:
- string@appid.appspotmail.com 应该去Handler1; li>
- string+something@appid.appspotmail.com 应该去Handler2;
- 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
正则表达式(?)应如何将发送到e-邮件带有加号到另一个处理程序?
How the regex (?) should look like to route messages sent to e-mail with plus sign to another handler?
推荐答案
[更新]
以下配置为我工作。
[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
这篇关于如何为传入的GAE电子邮件支持不同的处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文