Click here to Skip to main content
13,451,773 members (37,959 online)
Click here to Skip to main content
Add your own
alternative version


22 bookmarked
Posted 12 Sep 2008

Easily Send E-mail in

, 12 Sep 2008
Rate this:
Please Sign up or sign in to vote.
This is an easiest program that allows you to send e-mails by only defining SMTP Server name.


This is an easiest program to send an e-mail using


This program requires to import System namespace and creating an object of system,net.mail.Smtpclient and passing SMTP Server name as an argument.

First it is required to define SMTP Mail server name.


Using the code

You have to only define SMTP mail server name.

Now passing this server name as an argument to smtp client , and create and object which accepts to,from,subject and body of e-mail message.

Dim EmailServer As New System.Net.Mail.SmtpClient("Mail server name")    

Dim myMessage As New System.Net.Mail.MailMessage("Sender's address", "Receiver's address", "Subject", "Main msg")    


Now pass this myMessage object as argument to Emailserver.send(myMessage).


This is the easiest approach that I found for sending e-mails in 

If you like this article then vote me.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer
India India
No Biography provided

You may also be interested in...

Comments and Discussions

Generalvery simple - but well presented example Pin
whale200923-Feb-10 4:40
memberwhale200923-Feb-10 4:40 
General[Message Removed] Pin
nompel1-Oct-08 7:36
membernompel1-Oct-08 7:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04-2016 | 2.8.180318.3 | Last Updated 13 Sep 2008
Article Copyright 2008 by Gagan.20
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid