【问题标题】:Why isnt the mail I sent through SendGrid visible in my sent items? (.net core)为什么我通过 SendGrid 发送的邮件在我发送的项目中不可见? (.net 核心)
【发布时间】:2019-10-03 03:19:37
【问题描述】:

我尝试在使用 .Net 核心的发送网格邮件服务的帮助下发送邮件。

var client = new SendGridClient(xxxxxxxxxxxxxxxxxxxxxx);
var from = new EmailAddress("test@abc.com", "Not User");
var subject = "TestMail";
var to = new EmailAddress("test@abc.com, "Example User");
var plainTextContent = "This is body";
var htmlContent = "";
var msg = MailHelper.CreateSingleEmail(from, to, subject, plainTextContent, htmlContent);
client.SendEmailAsync(msg).Wait();

使用此代码发送的邮件在我邮箱的已发送项目中不可见。对此有什么可能的解决方案?提前致谢。

【问题讨论】:

    标签: c# azure email sendgrid


    【解决方案1】:

    当您发送电子邮件时,它使用 SMTP 直接发送到 sendgrid。当您通过 Google 发送时,他们会自动将其添加到您的发件箱中。要在其他人发送邮件时执行相同操作,您必须使用 IMAP 手动将已发送邮件的副本放入您的发件箱中。

    对此有什么可能的解决方案?

    您可以使用 SendGrid 的 BCC option 将允许您在发送每封电子邮件时密件抄送一个电子邮件地址,在这种情况下是您的邮件帐户。

    转到您的SendGrid Account>Manage>Settings>Mail Settings 并打开BCC 选项。

    注意:启用此设置后,您将需要为每发送一封电子邮件支付额外的费用。所以重新点击Manage,你会看到弹出消息。

    这是发送邮箱快照:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-08
      • 2017-06-05
      • 1970-01-01
      相关资源
      最近更新 更多