会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
黎宇
绝地反击
.net自带的mail组件
MailMessage mail
=
new
MailMessage();
mail.From
=
"
发送者的Email
"
;
mail.To
=
"
接收者的Email
"
;
mail.Subject
=
"
主题
"
;
mail.Body
=
"
内容
"
;
mail.BodyFormat
=
MailFormat.Html;
//
用html格式
mail.Fields.Add(
"
http://schemas.microsoft.com/cdo/configuration/smtpauthenticate
"
,
"
1
"
);
//
basic authentication
mail.Fields.Add(
"
http://schemas.microsoft.com/cdo/configuration/sendusername
"
,
"
邮箱用户名
"
);
//
set your username here
mail.Fields.Add(
"
http://schemas.microsoft.com/cdo/configuration/sendpassword
"
,
"
邮箱密码
"
);
//
set your password here
SmtpMail.SmtpServer
=
"
smtp.126.com
"
;
//
这里写邮局地址
SmtpMail.Send(mail);
posted on
2005-03-12 23:19
黎宇
阅读(
477
) 评论(
1
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
导航
博客园
首页
新随笔
联系
订阅
管理
公告