sendhtml.aspx
来自「asp.net技术内幕的书配源码」· ASPX 代码 · 共 25 行
ASPX
25 行
<%@ Import Namespace="System.Web.Mail" %>
<%
Dim objMailMessage As MailMessage
Dim strHTMLBody As String
' Create the HTML Message Body
strHTMLBody = "<html><head>" & _
"<title>Thank You!</title>" & _
"</head><body bgcolor=lightblue>" & _
"<font face=Script size=6>" & _
"Thank you for registering!" & _
"</font></body></html>"
' Create the Mail Message
objMailMessage = New MailMessage
objMailMessage.From = "you@somewhere.com"
objMailMessage.To = "joe@somewhere.com"
objMailMessage.Subject = "Thanks for Registering!"
objMailMessage.Body = strHTMLBody
objMailMessage.BodyFormat = MailFormat.HTML
' Send the Mail Message
SmtpMail.Send( objMailMessage )
%>
HTML Email Sent!
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?