B
Brian
Hello all, we don't actually host our own server but still should work
the same.
Here is the error message i get
"error mailbox unavailable. The server response was: must be
authenticated code 550"
and below is the code. the only thing i had to to do was change the
port as our isp blocks 25. Just wondering if anyone has run into this
beefore. TIA
' this calls the sendsimple mail
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
SendSimpleMail("(e-mail address removed)", "(e-mail address removed)",
"Yikes", "This is a test")
End Sub
Public Sub SendSimpleMail(ByVal FromAddr As String, ByVal ToAddr As
string, _
ByVal Subject As String, ByVal Body As String)
'
Dim Client As SmtpClient
Dim Message As MailMessage
' SMTP server goes here
Client = New SmtpClient("SMTP.domain.com")
Client.Credentials = New
System.Net.NetworkCredential("username??", "Password")
'Portproperties
Client.Port = 587
' Simple plain text message
Message = New MailMessage(FromAddr, ToAddr, Subject, Body)
' Send message
Try
Client.Send(Message)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, "SMTP Error")
End Try
Message = Nothing
Client = Nothing
End Sub
the same.
Here is the error message i get
"error mailbox unavailable. The server response was: must be
authenticated code 550"
and below is the code. the only thing i had to to do was change the
port as our isp blocks 25. Just wondering if anyone has run into this
beefore. TIA
' this calls the sendsimple mail
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
SendSimpleMail("(e-mail address removed)", "(e-mail address removed)",
"Yikes", "This is a test")
End Sub
Public Sub SendSimpleMail(ByVal FromAddr As String, ByVal ToAddr As
string, _
ByVal Subject As String, ByVal Body As String)
'
Dim Client As SmtpClient
Dim Message As MailMessage
' SMTP server goes here
Client = New SmtpClient("SMTP.domain.com")
Client.Credentials = New
System.Net.NetworkCredential("username??", "Password")
'Portproperties
Client.Port = 587
' Simple plain text message
Message = New MailMessage(FromAddr, ToAddr, Subject, Body)
' Send message
Try
Client.Send(Message)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, "SMTP Error")
End Try
Message = Nothing
Client = Nothing
End Sub