something like this perhaps
Dim mail As New MailMessage()
Dim smtp As New SmtpClient(Me.txtSMTPServer.Text)
' form the email, catch errors and report
Try
mail.IsBodyHtml = True
'set the addresses
mail.From = New MailAddress("SDSILogtool@sigmadatainc.com", "SDSI Logtool Utility")
mail.To.Add(Me.txtEmailAddress.Text)
'set the content
mail.Subject = "Backup Report - " & Me.txtCompanyName.Text & " " & Me.txtCurrentLogDate.Text
mail.Body = emailbody
'to authenticate we set the username and password properites on the SmtpClient
smtp.Credentials = New Net.NetworkCredential(Me.txtSMTPUsername.Text, Me.txtSMPTPassword.Text)
Catch ex As System.Exception
MsgBox("Error forming email. " & ex.Message.ToString)
End Try
'send, catch errors and report
Try
smtp.Send(mail)
Catch ex As System.Exception
MsgBox("Error sending email, check SMTP settings, or contact your administrator." & ex.Message.ToString)
End Try
Keith Chisarik