mail.aspx
上传用户:scene123
上传日期:2010-02-19
资源大小:3311k
文件大小:1k
- <% @Page Language="C#" Debug="true"%>
- <% @Import Namespace="System.Web.Mail" %>
- <%
- MailMessage msgMail = new MailMessage();
-
- msgMail.To = Request["accepter"]; //邮件接受者
- msgMail.Cc = "smtp@tianfei.com";
- msgMail.From = Request["sender"];
- msgMail.Subject = "您的朋友从ASPCOOL.COM给您推荐了一篇文章。";
-
- msgMail.BodyFormat = MailFormat.Html;
- string strBody = "<html><body><b>" + Request["accepter"] +"</b>,您好。<br>" +
- "您的朋友: <font color="red">"+ Request["sender"]+ "</font>从<a href=http://www.aspcool.com>ASP酷技术资讯网</a>给您推荐了一篇文章--<a href=http://www.aspcool.com/lanmu/dot.asp?ID=" +Request["id"]+ Request["title"]+"</a>.请<a href=http://www.aspcool.com/lanmu/dot.asp?ID=" +Request["id"]+ ">点此查看</a>。</body></html>"; //邮件内容
-
- msgMail.Body = strBody;
-
- SmtpMail.Send(msgMail);
-
- Response.Write("您好,您的推荐信已经发出去了,谢谢您对<a href=http://www.aspcool.com>ASP酷技术资讯网</a>的支持!请<a href=http://www.aspcool.com>返回</a>");
- %>