Web Mail
using System.Web.Mail;
using System.Net;
public string FYJ()
try
{
MailMessage Mail = new MailMessage();
Mail.From = "ceshi@163.com";//发邮件人地址(站长)
Mail.To = "abc@163.com";//目标地址(客户)
Mail.Subject = "测试发送邮件!";//邮件标题
Mail.Body = "哈哈你收到了吗,您的注册用户名是:"+name+" 密码是:"+pwd+" 请保管好你的用户名和密码!谢谢您的加入"; //要发的邮件内容
Mail.BodyFormat = MailFormat.Html;