MoonMail:没有订阅者到 attachSender

MoonMail: No subscriber to attachSender

活动发送进程启动时,AttachRecipientsService 发布到主题为 "ATTACH_SENDER_TOPIC_ARN" 的 SNS。但是,在 AWS / MoonMail 中没有此操作的订阅者。知道如何处理 "ATTACH_SENDER" 吗?

没有此信息就无法发送活动。

如此处所述:https://github.com/microapps/MoonMail/wiki/Campaigns

Users service will get the message and attach a sender object, with the actual sender credentials in case he’s able to send the campaign (pushing the message to the PrecompileCampaign topic), or will drop the message to the campaign errors topic.

但是没有用户服务。有什么想法吗?

Users服务没有开源,不过可以看看sendTestCampaign功能。如果您为它提供 campaignsender 对象,它基本上会立即向 PrecompileCampaign 主题发送 SNS 消息。

我通过向 "PRECOMPILE_CAMPAIGN_TOPIC_ARN" 发送 SNS 事件来替换用户服务。

events\lib\attach_recipients_count_service.js

 _publishToSns(canonicalMessage) {
        debug('= AttachRecipientsService._publishToSns', canonicalMessage);
        const params = {
          Message: JSON.stringify(canonicalMessage),
          TopicArn: process.env.PRECOMPILE_CAMPAIGN_TOPIC_ARN
        };
        return this.snsClient.publish(params).promise()
          .then(() => canonicalMessage);
      }

确保 canonicalMessage 包含 "sender" 对象:

"sender": {
    "region": "...",
    "apiKey": "...",
    "apiSecret": "...",
    "ratePerSecond": "...",
    "emailAddress": "...",
    "fromName": "..."
  }