TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Sent Email in VB.NET
Mukesh Kumar
Oct 03
2015
Code
2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Imports
System.Net.Mail
Public
Class
Form1
Private
Sub
Button1_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Button1.Click
Dim
Mail
As
New
MailMessage
Mail.Subject =
"test email"
Mail.
To
.Add(
"
[email protected]
"
)
Mail.From =
New
MailAddress(
"
[email protected]
"
)
Mail.Body =
"This is an ownage email using VB.NET"
Dim
SMTP
As
New
SmtpClient(
"smtp.gmail.com"
)
SMTP.EnableSsl =
True
SMTP.Credentials =
New
System.Net.NetworkCredential(
"username"
,
"password"
)
SMTP.Port =
"587"
SMTP.Send(Mail)
End
Sub
End
Class
vb.net
Sent Email
Sent Email in VB.NET