<%@import Namespace="system.net.mail" %>
<html>
<body>
<%
Dim ml_from, ml_to As MailAddress
ml_from = New MailAddress("[email protected]")
ml_to = New MailAddress("[email protected]")
Dim mailmsg As New MailMessage(ml_from, ml_to)
mailmsg.Subject = "test vb.net email page 199"
mailmsg.Body = "test vb.net email page 1999"
Dim smtp As New SmtpClient()
smtp.Host = "192.168.1.1"
Try
smtp.Send(mailmsg)
Response.Write("send mail finish")
Catch ex As Exception
Response.Write("can't send email")
End Try
%>
</body>
</html>