Costa Michailidis
Costa Michailidis

Reputation: 8178

Sending on behalf of users with Amazon SES

Sometimes it's necessary to send an email with the reply-to address of another user. For example, if a LinkedIn user sends a connection of theirs a LinkedIn message, it makes sense to send that email from the user that sent the message, so that clicking 'reply' actually replies to the person who sent the message.

Is there a way to do this with Amazon SES?

Upvotes: 0

Views: 1384

Answers (1)

Justinas
Justinas

Reputation: 43479

You can pass ReplyToAddresses parameter in $ses->sendEmail() (documentation PHP V2, assuming other languages and versions will have similar structure, search for it)

$sesClient->sendEmail([
    'Source' => '[email protected]',
    'Destination' => '[email protected]',
    'Message' => [
        'Subject' => [
            'Data' => 'Spammer attack',
        ],
        'Body' => [
            'Html' => [
                'Data' => 'Le Attacke!',
            ],
        ],
    ],
    'ReplyToAddresses' => [
        '[email protected]',
        '[email protected]',
        '[email protected]',
    ]
]);

Upvotes: 3

Related Questions