Click here to Skip to main content
Licence CPOL
First Posted 12 Sep 2008
Views 15,227
Downloads 1,083
Bookmarked 20 times

Easily Send E-mail in VB.net

By | 12 Sep 2008 | Article
This is an easiest program that allows you to send e-mails by only defining SMTP Server name.

Introduction

This is an easiest program to send an e-mail using vb.net

Background

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.

G-Emailer

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")    

snap2.jpg

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

History

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

If you like this article then vote me.

License

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

About the Author

Gagan.20

Software Developer

India India

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalvery simple - but well presented example Pinmemberwhale20094:40 23 Feb '10  
General[Message Removed] Pinmembernompel7:36 1 Oct '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web04 | 2.5.120517.1 | Last Updated 13 Sep 2008
Article Copyright 2008 by Gagan.20
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid