AWS SES SDK V2 不在交易电子邮件链接中显示跟踪信息

我使用的是 SAAS 系统,该系统同时发送营销和交易电子邮件。我最近将 AWS SDK 更新到 V2。这样做之后,我遇到了一些问题。问题之一是,在交易电子邮件中,我无法像营销电子邮件一样在链接中看到跟踪信息。

电子邮件链接中的跟踪信息示例:

营销电子邮件链接:

https://66vn8ch6.r.us-east-2.awstrack.me/L0/https:%2F%2Fexample.com%2Funsubscribe-list%2FIMT0FV6k4xLqo618nVtT%2F60e6bd30131f7b993266b012%3Fcampaign_id=60e6bd30131f7b993266b012%26contact_id=60d58d1474d88810cf96b7ca%26unsubscribe=campaign/1/SES-MESSAGE-ID/kTYgEJzybLQBCeyq3nW0YpKTfuo=225

交易电子邮件链接:

https://example.com/review/637224/mBS91knZyHyaIK0WYVjS

正如您在上面看到的,在第一个链接中,我可以看到电子邮件是从哪个区域发送的以及 ses 消息 ID 是什么。但在第二个链接中只显示普通链接。

这两种情况的 ses 输入是:

营销:


input := &sesv2.SendEmailInput{
    Destination: &types.Destination{
        CcAddresses: []string{},ToAddresses: []string{request.EmailTo},},Content: &types.EmailContent{
        Simple: &types.Message{
            Body: &types.Body{
                Html: &types.Content{
                    Charset: aws.String("UTF-8"),Data:    aws.String(emailData["body"]),Subject: &types.Content{
                Charset: aws.String("UTF-8"),Data:    aws.String(emailData["subject"]),ReplyToAddresses: []string{emailData["sender_name"] + " <" + replyTo + ">"},FromEmailaddress: aws.String(emailData["sender_name"] + " <" + emailData["sender_email"] + ">"),}
input.ConfigurationSetName = aws.String(config.EmailTrackingConfigSetName)

cfg,err := awsconfig.LoadDefaultConfig(context.TODO(),awsconfig.WithRegion(bkconfig.CampaignEmailAwsRegion),)
client := sesv2.NewFromConfig(cfg)
emailResp,err := client.SendEmail(context.TODO(),input)

交易:


CharSet := "UTF-8"
input := &sesv2.SendEmailInput{
    Destination: &types.Destination{
        CcAddresses: []string{},Content: &types.EmailContent{
        Simple: &types.Message{
            Body: &types.Body{
                Html: &types.Content{
                    Charset: aws.String(CharSet),Data:    aws.String(body),Subject: &types.Content{
                Charset: aws.String(CharSet),Data:    aws.String(subject),ReplyToAddresses: []string{"\"" + storeDetails["email_display_name"] + "\" <" + replyTo + ">"},FromEmailaddress: aws.String("\"" + storeDetails["email_display_name"] + "\" <" + storeDetails["sender_email"] + ">"),}
input.ConfigurationSetName = aws.String(config.EmailTrackingConfigSetName)
/* Attempt to send the email */
cfg,awsconfig.WithRegion(config.AwsRegion),input)

iCMS 回答:AWS SES SDK V2 不在交易电子邮件链接中显示跟踪信息

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/130371.html

大家都在问