小编pee*_*cro的帖子

在C#中使用X-SMTPAPI的Sendgrid字符编码标头

我正在使用SendGridPlus API发送带有SendGrid的电子邮件.一切正常.但我有一个西班牙字符的问题,á或者é当我将它们包含在标题中的替换值时.

例如,如果我包括Que día más bueno hace我收到Que d?a m?s bueno hace.

这是代码:

       [Test]
    public void TestSendGrid()
    {
        //create a new message object
        var message = Mail.GetInstance();
        var recipients = new List<string>();

        //You could loop through your dataset here and add each recipient, up to 1000 recipients per message
        recipients.Add("juanp_perez@loyaltycrm.com");
        recipients.Add("juanp_perez@msn.com");

        //We want to add the recipients to the X-SMTPAPI header
        message.Header.AddTo(recipients);

        //Even though we added recipients to the Header, the …
Run Code Online (Sandbox Code Playgroud)

c# sendgrid

6
推荐指数
1
解决办法
3530
查看次数

标签 统计

c# ×1

sendgrid ×1