asp+发送Email完全手册,asp+发送Email完全手册
【 tulaoshi.com - ASP.NET 】
/*SmtpMail.Send(strFrom, strTo, strSubject,"这仅仅是个简单的文本mail");
Response.Write("Email 已经发送成功");
%
2.asp+发送HTML 格式的mail
请注意,这里用了另外的一种发送命令
<% @Page Language="C#" %
<% @Import Namespace="System.Web.Util" %
<%
MailMessage msgMail = new MailMessage();
msgMail.To = "asp888@asp888.net";
msgMail.Cc = "doufu@asp888.net";
msgMail.From = "webmaster@asp888.net";
msgMail.Subject = "asp+发送HTML 格式的mail";
msgMail.BodyFormat = MailFormat.Html;
string strBody = "<html<body<bHello World</b" +
" <font color="red"ASP+</font</body</html";
msgMail.Body = strBody;
SmtpMail.Send(msgMail);
Response.Write("Email 已经发送成功");
%
3.asp+ 发送带有 附件的Email
<% @Page Language="C#" %
<% @Import Namespace="System.Web.Util" %
<%
MailMessage msgMail = new MailMessage();
msgMail.To = "asp888@asp888.net";
msgMail.From = "webmaster@asp888.net";
msgMail.Subject = "Attachment Test";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = "Check out the attachment!";
msgMail.Attachments.Add(new MailAttachment("c:tempdoufu.txt"));
SmtpMail.Send(msgMail);
Response.Write("Email 已经发送成功");
%
好了,看完这篇文章以后,您是不是对于Email发送在asp+中的操作已经没有问题了?哦!还有
问题,没有关系,随时留意本站的更新吧
来源:http://www.tulaoshi.com/n/20160129/1492249.html
看过《asp+发送Email完全手册》的人还看了以下文章 更多>>