asp.net///< summary>
< author> flying Eagle @aspcool.com
< description> This article with the ASP.net implementation of this article recommended to the friend's function.
< copyright>asp Cool technology Information Network (www.ASPCool.com)
</summary>
Here the eagle uses a simple example to show you how to use the ASP.net mail delivery function. First, let's do a send interface first. Tuijian.asp, where title is the title of the article, and the ID represents the number of the article.
< html>
< body>
Hello, welcome to use the ASP Cool technology Information Network article recommendation function, you recommend the article is: "<%=request (" title ")%>" .< br>
< form action= "mail.aspx" >
Your mailbox:< INPUT type= "text" name= "sender" >
Recipient mailbox:< INPUT type= "text" name= "Accepter" >
< INPUT type= "hidden" name= "title" Value= "<%=request (" title ")%>" >
< INPUT type= "hidden" name= id "value=" <%=request ("id")%> ">
< input type= "submit" value= "send" >< INPUT type= "reset" value= "rewrite" >
</form>
</body>
Below we use ASP.net to implement the recommended article function, mail.aspx
<% @Page language= "C #" debug= "true"%>
<% @Import namespace= "System.Web.Mail"%>
<%
MailMessage msgmail = new MailMessage ();
msgmail.to = request["Accepter"]; Mail Recipient
msgmail.cc = "webmaster@aspcool.com";
Msgmail.from = request["Sender"];
Msgmail.subject = "Your friend has recommended an article to you from aspcool.com." ";
Msgmail.bodyformat = mailformat.html;
String strbody = "< html>< body>< b>" + request["Accepter"] + "Hello. < br> "+
"Your friend: < font color=\" red\ ">" + request["sender"]+ "from < a href=http://www.aspcool.com>asp cool technology information network to recommend an article to you-- < a href=http://www.aspcool.com/lanmu/dot.asp?id= "+request[" ID "]+ request[" title "+". please
Msgmail.body = strbody;
Smtpmail.send (Msgmail);
Response.Write ("Hello, your letter of recommendation has been sent out, thank you for the Cool Technology Information Network support");
%>
See, is not very simple, if you have to support asp.net space, you can easily recommend your site.