Is there a way to send username and passwords to a mail server using code
similar to below? My email server requires a username and password to send
mail.
Private Sub MailError(ByVal ErrorMessage As String)
Try
Dim _mm As New MailMessage
SmtpMail.SmtpSe rver = "smtp.server.co m"
_mm.
_mm.BodyFormat = Mail.MailFormat .Html
_mm.From = xx**@xxx.com
_mm.Subject = "IPN Error"
_mm.Body = "IPN Error " & "<br />" & vbCrLf & "<br />" & vbCrLf
_mm.To = "yy*@yyyy.c om"
_mm.Body = "Transactio n time: " & DateTime.Now & vbCrLf & vbCrLf &
ErrorMessage
SmtpMail.Send(_ mm)
Catch ex As Exception
Debug.WriteLine (ex.Message)
End Try
End Sub