Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Sent Email in VB.NET
WhatsApp
Mukesh Kumar
Oct 03
2015
2.1
k
0
0
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
Up Next
Sent Email in VB.NET