According to the new Gmail/Yahoo email guidelines, we are required to implement a one-click unsubscribe option.
I am currently utilizing the Php Amazon SES SDK, and my code looks like this. However, I am unable to observe the headers in the source code of the email.
By the way, I specifically require a click to redirect to my site instead of utilizing the subscription method provided by Amazon SES. The documentation mentions, "To set up one-click unsubscribe without using the SES subscription management feature [...]."
I came across information suggesting the use of sendRawEmail, but it does not provide detailed instructions on how to implement this.
https://aws.amazon.com/es/blogs/messaging-and-targeting/an-overview-of-bulk-sender-changes-at-yahoo-gmail/
$client->sendEmail([
'ConfigurationSetName' => 'Conf_bounce',
'Destination' => [
'ToAddresses' => [$paraName.' <'.$paraMail.'>'],
],
'Message' => [
'Body' => [
'Html' => [
'Charset' => 'utf-8',
'Data' => utf8_encode($msgMail),
]
],
'Subject' => [
'Charset' => 'utf-8',
'Data' => utf8_encode($titMail),
],
],
'ReturnPath' => 'bounce@domain.com',
'Source' => utf8_decode($remitente).' <correo@domain.com>',
'Tags' => [
[
'Name' => 'id_boletin',
'Value' => $boletinID
]
],
'MessageHeaders' => [
'List-Unsubscribe-Post' => 'List-Unsubscribe=One-Click',
'List-Unsubscribe' => '<https://domain.com/baja.php?************'>'
],
]);