V
Volker Jobst
Hi,
The following code works fine as long as I don't use a smtp-server which
requires authentication:
Sub sendMail()
Dim sfrom As String = TextBox1.Text
Dim sto As String = TextBox2.Text
Dim ssubject As String = TextBox3.Text
Dim sbody As String = RichTextBox1.Text
Dim omail As New MailMessage
With omail
..From = sfrom
..To = sto
..Subject = ssubject
..Body = sbody
End With
SmtpMail.SmtpServer = ""
Try
SmtpMail.Send(omail)
MsgBox("Alles ok")
Catch ex As System.Web.HttpException
MsgBox(ex.ErrorCode & " - " & ex.ToString)
End Try
End Sub
But I don't know how to use a server which requires authentication. I don't
know how to send the username and the password.
Thanx a lot.
volker jobst
The following code works fine as long as I don't use a smtp-server which
requires authentication:
Sub sendMail()
Dim sfrom As String = TextBox1.Text
Dim sto As String = TextBox2.Text
Dim ssubject As String = TextBox3.Text
Dim sbody As String = RichTextBox1.Text
Dim omail As New MailMessage
With omail
..From = sfrom
..To = sto
..Subject = ssubject
..Body = sbody
End With
SmtpMail.SmtpServer = ""
Try
SmtpMail.Send(omail)
MsgBox("Alles ok")
Catch ex As System.Web.HttpException
MsgBox(ex.ErrorCode & " - " & ex.ToString)
End Try
End Sub
But I don't know how to use a server which requires authentication. I don't
know how to send the username and the password.
Thanx a lot.
volker jobst