AWS中是否有lambda函数或其他钩子可以拦截和修改发送的电子邮件主题行?

huangapple go评论69阅读模式
英文:

Is there a lambda function or other hooks in AWS that can intercept and modify outgoing emails subject line?

问题

我们使用一个应用程序根据应用程序工作流逻辑向注册用户发送电子邮件通知。我们使用AWS SES SMTP配置和凭据。该设置正常工作,电子邮件已成功发送。

然而,我想拦截发送的电子邮件并根据AWS环境添加前缀来修改主题。例如,如果我们处于测试环境中,我希望在主题前添加[TEST]。由于应用程序不允许此类定制,我想知道是否可以通过自定义Lambda函数或AWS SES执行此操作。

我已经查看了一些关于拦截并将电子邮件保存到S3的问题,但没有一个问题涉及或引用了出站电子邮件功能挂钩。是否有办法拦截并修改AWS上的主题行?

英文:

We use an application that sends email notifications to registered users based on the application workflow logic. We use AWS SES SMTP configurations and credentials. The setting works and emails are delivered.

However, I want to intercept the outgoing emails and modify the Subject by adding a prefix based on the AWS environment. For example, if we are in the test environment, I would like to prefix the subject with [TEST]. Since the application does not allow this type of customization, I am wondering if this action can be performed by a custom lambda function or AWS SES.

I have reviewed some of the questions here that intercept and save emails to S3 but none of those questions address or reference an outgoing email function hook. Is there a way to intercept and modify the Subject line on AWS?

答案1

得分: 2

没有:没有SES -> Lambda事件适用于“发送”的消息,只适用于“接收”的消息,请参阅 AWS Lambda SES集成文档

我建议将您的“发送”消息通过Lambda路由到SNS或SQS,然后再发送到SES。

英文:

No: there is no SES -> Lambda event for outgoing messages, only incoming messages, see AWS Lambda SES Integration docs.

I would suggest routing your outgoing messages to SNS or SQS, through Lambda, then to SES.

huangapple
  • 本文由 发表于 2020年1月7日 01:00:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/59616114.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定