VB - Sending emails
In this tutorial you will learn how you can send emails using Visual Basic 2010.
Start by creating a new project, and call it Emailer or something like that.
Add some controls to your form to make it look like this:

2x Label
2x Textbox
1x Button
Double click your button to edit the codes behind your button.
First of all, we need to import a class..

Imports System.Net.Mail
Now, you need to add some codes to your button1_Click event:

TryDim SmtpServer As New SmtpClient()Dim mail As New MailMessage()SmtpServer.Credentials = New Net.NetworkCredential("username@gmail.com", "password") 'gmail email address and its passwordSmtpServer.Port = 587 'The portSmtpServer.Host = "smtp.gmail.com" 'Host is gmailmail = New MailMessage()mail.From = New MailAddress("username@gmail.com") 'Same email addres as used abovemail.To.Add("TOADDRESS") 'to e.g. blah@blah.commail.Subject = TextBox1.Text 'This is the subjectmail.Body = TextBox2.Text 'This is the messageSmtpServer.Send(mail)MsgBox("mail send")Catch ex As ExceptionMsgBox(ex.ToString)End Try
Remeber to change your credentials or otherwise this wont work.
I hope you found this tutorial useful.
You can download the source codes here:
Topic: VB - Sending emails
Date: 06/05/2021
Subject: Продвигай сайт статьями и попади в ТОП
—————
Date: 20/07/2013
Subject: answer
—————
Date: 08/05/2013
Subject: coding
—————
Date: 07/04/2013
Subject: need help!
—————
Date: 23/12/2012
Subject: error
—————
Date: 30/11/2012
Subject: Timed out problem
—————
Date: 04/11/2012
Subject: Thanks a lot
—————
Date: 18/10/2012
Subject: pp
—————
Date: 25/09/2012
Subject: dsf
—————
Date: 31/08/2012
Subject: sasas
—————
