Imports System.Net.Mail Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Mail As New MailMessage Mail.Subject = "test email" Mail.To.Add("emailaddress") Mail.From = New MailAddress("emailaddress") Mail.Body = TextBox1.Text Dim SMTP As New SmtpClient("smtpserver") SMTP.EnableSsl = True SMTP.Credentials = New System.Net.NetworkCredential("username", "password") SMTP.Port = 25 SMTP.Send(Mail) End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)