<script language= "VB" runat= "Server" >
Sub Btnsendmail_onclick (Source as Object, E as EventArgs)
Dim Mymessage as New mailmessage
Dim MyMail as New smtpmail
Dim Stremail as String
If Page.IsValid () Then
Stremail = Txtemail.text
Mymessage.from = "webmaster@" & Request.ServerVariables ("SERVER_NAME")
Mymessage.to = Stremail
Mymessage.subject = "e-mail Sample from ASP 101!"
Mymessage.body = "This message is sent from sample code by" & _
"Http://www.asp101.com. It is used to show people "& _
"To send e-mail from a asp+ page." This mail is sent "& _
"From" & Request.ServerVariables ("SERVER_NAME") &. "& _
VbCrLf & VbCrLf & _
"This email is sent to" & Stremail & "."
Mymail.send (Mymessage)
Frmemail.visible = False
Lblusermessage.text = "Your message has been sent to" & Stremail & "."
End If
End Sub
</script>
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.