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
gefragt vor 4 Monaten277 Aufrufe
1 Antwort
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
beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen