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?************'>'
		],
	]);
1개 답변
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
답변함 4달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠