0

当用户在文本框中输入电子邮件地址后点击发送按钮时如何发送电子邮件(自动生成)?有什么网站可以参考吗?非常感谢

4

1 回答 1

2

你真的应该做更多的研究,因为你正在寻找的答案很容易找到。但是,这将为您指明正确的方向。

using System.Net.Mail;  
    MailMessage mm = new MailMessage("from@here.com", "to@there.com");
    mm.Subject = "some subject";
    mm.IsBodyHtml = true;
    mm.Body = "<span>your html goes here -- for plain text see IsBodyHtml property</span>";         
    SmtpClient client = new SmtpClient();
    client.Send(mm);
于 2012-09-17T13:28:08.267 回答