How to add List-Unsubscribe and List-Unsubscribe-Post

0

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?************'>'
		],
	]);
sunco
asked 3 months ago246 views
1 Answer
0

Looks like you use SESv1 SendEmail action. It doesn't look like there is a MessageHeaders parameter in this call, or any other.

eric_g
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions