SIGN UP MEMBER LOGIN:    
Blog

How to send mail in ASP.NET using VB.NET

Posted by Micalgray Blogs | ASP.NET using VB.NET Jul 28, 2011
This blog defines how to send a mail in ASP.NET.

In this Blog you will learn how to send emails from you .aspx site. This step is be sure that the SMTP Server is locally installed at SMTP Service of the IIS.

Namespace

We use the below namespace.

Imports System.Web.Mail

 

SmtpMail class

this class has a method called Send that allows the user to send an email, in this way we set four parameters:

SmtpMail.Send("rohatash.mca@gmail.com","rohatas.mca@gmail.com","Rohatash","Hello World");

Now build your message.

Dim [To] As String = "rohatash.mca@gmail.com"

        Dim From As String = "rohatas.mca@gmail.com"

        Dim Subject As String = "Rohatash"

        Dim Body As String = "Hello World"

 

        SmtpMail.Send(From, [To], Subject, Body)

share this blog :
post comment