Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Send an Email With VB.net
Author:
Omar Abid
E-mail:
Click to e-mail author
Website:
http://omarabid.blogspot.com
Submitted:
9/25/2007
Version:
VB 2005
Compatibility:
VB 2005, VB 2008
Category:
Internet Programming
Views:
22667
This will help you to send an email with vb.net. You'll need only access to the SMTP Server.
Declarations:
Imports System.Web.mail
Code:
Try Dim insMail As New MailMessage() With insMail .From = "omar.abid2006@gmail.com" .To = "omar.abid2006@gmail.com" .Subject = "test" .Body = "test sending email" End With SmtpMail.SmtpServer = "your smtp server" SmtpMail.Send(insMail) Console.WriteLine("Successfully sent email message" + vbCrLf) Catch err As Exception Console.WriteLine("EXCEPTION " + err.Message + vbCrLf) End Try
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2023 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement