我不确定你在问什么。如果您询问如何发送电子邮件,.NET Framework 包含用于通过 SMTP 发送电子邮件的 System.Net.Mail 命名空间。
您可以创建一个新的SmtpClient. 如果它部署在 LAN 上,那么您可以将Host属性设置为 Exchange 服务器或其他 SMTP 服务器。
然后,您可以创建一个MailMessage将正文设置为要发送的 HTML 内容的内容。
这是一个示例:
//create the mail message
MailMessage mail = new MailMessage();
//set the addresses
mail.From = new MailAddress("me@mycompany.com");
mail.To.Add("you@yourcompany.com");
//set the content
mail.Subject = "This is an email";
mail.Body = "this is a sample body with html in it. <b>This is bold</b> <font color=#336699>This is blue</font>";
mail.IsBodyHtml = true;
//send the message
SmtpClient smtp = new SmtpClient("127.0.0.1");
smtp.Send(mail);