• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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