I have made something very basic in the past, however it was using Gmail, it was for submitting error reports but you may be able to modify it to fit your needs. It has worked but I don't know if it's the best way to do it:
Hope it helps.Code:Imports System.Net.Mail Public Class Form1 Private Sub Button1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Sets up SMTP Dim smtpserver As New SmtpClient Dim mail As New MailMessage smtpserver.Credentials = New 'Declares info to use to send emails Net.NetworkCredential("GmailUsernameHere", "Password") smtpserver.Port = 587 smtpserver.Host = "smtp.gmail.com" smtpserver.EnableSsl = True 'Creates the email message mail = New MailMessage() 'Declares your email address mail.From = New MailAddress("YourEmailHere") 'Declares where to send it mail.To.Add("RecipientEmailHere") 'Message contents mail.Subject = "Subject" mail.Body = TextBox1.Text 'Sends the email smtpserver.Send(mail)
Edit: Added in ' comments for ease of understanding how it works.





Reply With Quote