[英]How to setup the "List-Unsubscribe" header in Amazon AWS SES API using the sendEmail function in PHP?
我正在嘗試使用 PHP 中的 sendEmail 函數在 Amazon AWS SES API 中設置“List-Unsubscribe”標頭。 我已經查看了亞馬遜的文檔和此處的許多其他帖子,但尚未找到任何有效的方法。 這是我目前正在使用的:
$client->sendEmail(array(
// all the main stuff like 'source', 'message', 'body', etc
'List-Unsubscribe' => '<http://unsubscribe.link>',
));
... 其中http://unsubscribe.link是我的取消訂閱 URL。
有什么建議么?
您需要使用sendRawEmail而不是sendEmail
來構建原始消息並向其添加List-Unsubscribe
標頭。
提示:最好使用 mailto-links 而不是List-Unsubscribe: <mailto:unsubscribe@example.com>
因為並非所有郵件客戶端都支持 http 退訂鏈接。
自 2019 年底以來有“SES v2”,因此方法名稱為sendEmail
,但建議基本相同。 sendEmail
中有一個rawEmail
選項,您需要使用它才能設置自己的標頭。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.