[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

Asp.net Email Setup giving me an error-Syntax error, command unrecognized. The server response was: imp10 smtp.charter.net MjE2LjEwLjI0Ni4xNjE= You must connect from Charter IP space. E1110

Error msg:
Asp.net Email Setup giving me an error-Syntax error, command unrecognized. The server response was: imp10 smtp.charter.net MjE2LjEwLjI0Ni4xNjE= You must connect from Charter IP space. E1110

My code:
    Protected Sub EmailChecked_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles EmailChecked.Click
        Dim sb As New StringBuilder()

        For Each gr As GridViewRow In uxItemDetailGrid.Rows
            Dim cb As CheckBox = DirectCast(gr.FindControl("RowLevelCheckBox"), CheckBox)
            If cb.Checked Then
                sb.Append(uxItemDetailGrid.DataKeys(gr.RowIndex)("strBadgeName").ToString())
                sb.Append(",")
            End If
        Next

        If sb.ToString() <> "" Then

            Dim msg As New MailMessage("westdh@charter.net", sb.ToString())
            msg.Subject = txtEmailSubject.Value
            msg.Body = txtArea.Value
            Dim sc As New SmtpClient("mail.charter.net", 25)
            sc.Credentials = New Net.NetworkCredential("westdh@charter.net", "xxxxxx")
            sc.EnableSsl = True
            Try
                sc.Send(msg)
                Response.Write("<B>Email Has been sent successfully.</B>")
            Catch ex As Exception
                Response.Write(ex.Message)
            End Try
        End If

    End Sub
0
westdh
Asked:
westdh
1 Solution
 
westdhAuthor Commented:
I have already found by setup problem
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now