Sending Email via asp.net and Cdonts[vs bate2 grade, high]
Source: Internet
Author: User
asp.net <%@ Page language= "VB" enablesessionstate= "false" Enableviewstate= "false" Trace= "false" debug= "false" strict= "True"%>
<%@ Import namespace= "System.Web.Mail"%>
<script language= "VB" runat=server>
Sub Page_Load (Sender as Object, E as EventArgs)
If Request.Form ("emailaddress") = "" Then
Dim strresponse As String = "Lblmessage.text = Strresponse
Else
Dim strresponse As String = "You just sent a email message formatted in HTML to:<br>Lblmessage.text = Strresponse
End If
End Sub
Sub Btn_click (sender as Object, E as System.EventArgs)
If Request.Form ("EmailAddress") <> ""
Dim Mail as New mailmessage
Mail. from = "Youraddress@domain.com"
Mail. to = Request.Form ("EmailAddress")
Mail. Subject = "message sent using ASP.net and cdonts"
Mail. BODY = "HTML message sent from aspfree.com using asp.net and cdonts<br><a href= ' Http://aspfree.com/aspnet/email. aspx ' >wonder how it is done?</a><br><br><a href= ' http://aspfree.com/aspnet/ Setupcdonts.aspx ' >wonder to setup cdonts?</a> '
Mail. BodyFormat = mailformat.html
Smtpmail.send (mail)
End If
End Sub
</script>
<body>
<H1 align= "center" >sending Email via asp.net and CDONTS. <b><a href= "/aspnet/setupcdonts.aspx" >how do I setup my server to use cdonts?</a></b>
<br/>
<br/>
<a href= "/allzips/emaildotnet.zip" ></a>
<br/>
<br/>
<asp:label id= "lblmessage" font-name= "Verdana" width= "400px" borderstyle= "solid" "bordercolor=" #cccccc "runat=" Server "/>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.