Código:
Imports System.Web.Mail
PublicClass WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> PrivateSub InitializeComponent()
EndSub
ProtectedWithEvents BSend As System.Web.UI.WebControls.Button
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
PrivateSub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
EndSub
#EndRegion
PrivateSub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
Dim email AsNew MailMessage
With email
.From = "[email protected]"
.To = "[email protected]"
.Subject = "Artículo de MSDN"
.Body = "Lea todos los artículos de MSDN, para aprovechar la tecnología al máximo."
EndWith
SmtpMail.Send(email)
BSend.Text = "Enviado"
EndSub
EndClass
Ese e smi kodigo, pero no funciona en lo mas minimo. Debo tener server SMTP o Echange???