如何通过 smtp 发送电子邮件作为 gmail 对话的一部分? 考同样的科目不行...
如果您需要更多信息,请告诉我... 提前致谢!
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
mail.From = new MailAddress("@googlemail.com");
mail.To.Add("@.com");
mail.Subject = "(Somee.com notification) New order confirmation";
mail.Body = "(Somee.com notification) New order confirmation";
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("", "");
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
最佳答案
您需要使用以下内容:
mail.Headers.Add("In-Reply-To", <messageid>);
您应该能够从上一封电子邮件的标题中获取的邮件 ID。只需查找“Message-Id”即可。
This answer提供了一些您可能想要添加的标题,以尝试帮助其他客户端中的线程。似乎 gmail 现在也在使用这些。
关于c# - 通过 smtp 的 gmail 对话,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7545146/