Go 1.11 已达到支持终止期限,将于 2026 年 1 月 31 日
弃用。弃用后,您将无法部署 Go 1.11 应用,即使您的组织之前曾使用组织政策重新启用旧版运行时的部署也是如此。现有的 Go 1.11 应用在
弃用日期之后将继续运行并接收流量。我们建议您
迁移到最新支持的 Go 版本。
接收退信通知
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
要接收电子邮件退信通知,您需要配置自己的应用启用电子邮件通知且需要创建处理程序来处理这些通知。
配置您的应用以接收退信通知
配置由两个部分组成。首先,您需要启用通知。其次,您需要设置 /_ah/bounce
和退信处理程序之间的映射,以便 App Engine 知道在哪里发布通知数据。如需配置您的应用以接收退信电子邮件通知,请执行以下操作:
- 将以下内容添加到您的
app.yaml
文件以启用通知:
inbound_services:
- mail_bounce
- 在
app.yaml
中,同样在代码中声明 /_ah/bounce
与退信通知处理程序之间的映射,例如:- url: /_ah/bounce
script: _go_app
login: admin
处理退信通知
您需要在应用中编写退信处理程序代码,以便接收和处理退信通知。
退回通知将作为对 /_ah/bounce
的 POST 请求发送到您的应用。退信相关信息将在请求正文中进行表单编码。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-09-04。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eTo get email bounce notifications, you must enable email notifications in your app and create a handler for them.\u003c/p\u003e\n"],["\u003cp\u003eEnable bounce notifications in your \u003ccode\u003eapp.yaml\u003c/code\u003e file by adding \u003ccode\u003einbound_services: - mail_bounce\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIn \u003ccode\u003eapp.yaml\u003c/code\u003e, map \u003ccode\u003e/_ah/bounce\u003c/code\u003e to your bounce handler, specifying where to POST notification data.\u003c/p\u003e\n"],["\u003cp\u003eYour bounce handler will receive POST requests to \u003ccode\u003e/_ah/bounce\u003c/code\u003e, containing form-encoded bounce information.\u003c/p\u003e\n"]]],[],null,["# Receiving Bounce Notification\n\nIn order to receive email bounce notifications, you need to configure\nyour app to enable email notification and you need to create a handler\nto handle those notifications.\n\nConfiguring Your App to Receive Bounce\nNotifications\n----------------------------------------------------\n\nThere are two parts to the configuration. First, you need to enable\nnotification. Second, you need to set the mapping between\n`/_ah/bounce` and your bounce handler, so App Engine knows where to\nPOST the notification data. To configure your app to receive bounced email\nnotifications:\n\n1. Add the following to your `app.yaml` file to enable notification: \n\n ```scdoc\n inbound_services:\n - mail_bounce\n ```\n2. Also in `app.yaml`, declare a mapping between `/_ah/bounce` and the bounce notification handler in your code, for example: \n\n ```scdoc\n - url: /_ah/bounce\n script: _go_app\n login: admin\n ```\n\nHandling Bounce Notifications\n-----------------------------\n\nIn your app, you'll need to supply bounce handler code to receive and\nprocess the notifications.\n\nThe bounce notification will be sent to your app as a POST request to\n`/_ah/bounce`. Information about the bounce will be form-encoded in\nthe body of the request."]]