繁体中文
设为首页
加入收藏
当前位置:ASP技术首页 >> ASP应用 >> 使用 System.Web.Mail发送邮件

使用 System.Web.Mail发送邮件

2005-10-23 10:34:07  作者:EANFS  来源:互联网  浏览次数:60  文字大小:【】【】【
简介://simple emailMailMessage mail = new MailMessage();mail.To = "me@mycompany.com";mail.From = "you@yourcompany.com";mail.Subject = "this is a test email.";mail.Body = &...
关键字:邮件 System Mail Web

//simple email

MailMessage mail = new MailMessage();

mail.To = "me@mycompany.com";

mail.From = "you@yourcompany.com";

mail.Subject = "this is a test email.";

mail.Body = "this is my test email body";

SmtpMail.SmtpServer = "localhost"; //your real server goes here

SmtpMail.Send( mail );

责任编辑:admin
相关文章