使用 Amazon SES 代表用户发送

Sending on behalf of users with Amazon SES

有时需要发送一封包含其他用户回复地址的电子邮件。例如,如果 LinkedIn 用户向他们的连接发送 LinkedIn 消息,则发送来自发送消息的用户的电子邮件是有意义的,因此单击 'reply' 实际上会回复发送消息的人。

有没有办法用 Amazon SES 做到这一点?

你可以在$ses->sendEmail()中传递ReplyToAddresses参数(documentation PHP V2,假设其他语言和版本会有类似的结构,搜索它)

$sesClient->sendEmail([
    'Source' => 'sender@mail.ru',
    'Destination' => 'dummy@clie.nt',
    'Message' => [
        'Subject' => [
            'Data' => 'Spammer attack',
        ],
        'Body' => [
            'Html' => [
                'Data' => 'Le Attacke!',
            ],
        ],
    ],
    'ReplyToAddresses' => [
        'reply@ema.il',
        'sender@mail.ru',
        'dummy@clie.nt',
    ]
]);