Send an Email With VB.NET





3
Date Submitted Sat. Nov. 3rd, 2007 5:54 AM
Revision 1 of 1
Beginner omarabid
Tags Email | Send | VB
Comments 1 comments
Send an email with VB.net 2.0 with your SMTP Serve

'send the email
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
 

omar abid

Comments

Comments Nice !
Sat. Nov. 3rd, 2007 5:56 AM    Beginner omarabid

Voting

Votes Down