[英]SendGrid throwing InvalidApiRequestException
Sendgrid is sending the Invalid Api Request exception. Sendgrid正在发送无效的Api请求异常。
I am using the following code: 我正在使用以下代码:
try
{
SendGridMessage message = new SendGridMessage();
message.From = new MailAddress("test@gmail.com", "Poonam");
message.AddTo("ppändey@test.com");
message.Subject = "Test Email Subject";
message.Subject.Normalize(NormalizationForm.FormKD);
message.Html = "<b>Test Email</b>";
message.EnableTemplateEngine(SendGridTemplateId);
await DeliverMessage(message).ConfigureAwait(false);
}
catch (InvalidApiRequestException e)
{
throw;
}
catch (Exception ex)
{
throw;
}
The exact error that i am getting is " InvalidApiRequestException: Invalid email address ppändey@test.com " 我得到的确切错误是“ InvalidApiRequestException:无效的电子邮件地址ppändey@test.com ”
When i try to change the email id from "ppändey@test.com" to "ppandey@test.com" it works fine (ie replacing the ä with a). 当我尝试将电子邮件ID从“ppändey@test.com”更改为“ ppandey@test.com”时,它可以正常工作(即用a替换ä)。
This issue is somewhat similar to what define in SendGrid throwing InvalidApiRequestException in sending email 此问题有点类似于在发送电子邮件时在SendGrid中定义抛出InvalidApiRequestException的定义
But i am unable to find the solution. 但是我找不到解决方案。 Can anyone please suggest what can be the solution for this.
任何人都可以提出解决方案。
Any kind of help will be appreciated. 任何帮助将不胜感激。
Thank you in advance. 先感谢您。
不幸的是,您提供的ppändey@test.com
电子邮件地址包含Unicode字符,但ppändey@test.com
仍不将其作为有效的电子邮件ID字符,但已计划在以后的版本中发布。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.