SendGrid SetSubscriptionTracking不起作用

时间:2019-06-01 05:38:36

标签: c# sendgrid sendgrid-api-v3

我在.NET Core 2.1中,并在C#中使用SendGrid,可从NuGet(v9.10)获得。我使用以下代码:

var sendGridClient = new SendGridClient(this._apiKey);

var invitationMsg = new SendGridMessage();

invitationMsg.SetFrom(new EmailAddress("no-reply@xxx.com", "xxx"));
invitationMsg.AddTos(new List<EmailAddress> { new EmailAddress { Email = email, Name = email } });
invitationMsg.SetClickTracking(true, false);
invitationMsg.SetSubscriptionTracking(true);
invitationMsg.SetSubject(subject);
invitationMsg.AddContent(MimeType.Html, htmlMessage);

在“管理”>“设置”>“跟踪”中,我已启用“订阅跟踪”,并且将“取消订阅内容-HTML正文”设置设置为默认值:

If you'd like to unsubscribe and stop receiving these emails <% click here %>.

当我发送电子邮件时,没有添加页脚。知道如何添加吗?

0 个答案:

没有答案