Dns test fail on the correct asp.net dns

Hi I am doing a dns test before sending mail so that I don't get errors. But there is a problem when I try to send an email to xxxxx@eco-log.se I get an error message from the dns function. when I try to remove the "-" in the mailing address, it works.

at first I had this because of a “-”, but I did an email at zzzzzz@eh-design.se and it works like a charm, what could be the problem? 100% sure that " xxxxx@eco-log.se " is an existing email address / DNS. The error message im get is "There is no such known source" (freely translated)

Here is the dns verification code:

Public Function testDNS(ByVal dnsstring As String) As Boolean
    Dim email As String = dnsstring
    Dim host As String() = email.Split("@")
    Dim hostName As String = host(1)
    Dim socket As Net.Sockets.Socket
    Try
        Dim entry As IPHostEntry = Dns.GetHostEntry(hostName)
        Dim endPoint As New IPEndPoint(entry.AddressList(0), 25)
        socket = New Sockets.Socket(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp)
        Return True
        socket.Connect(endPoint)
    Catch se As SocketException
        Try
            Return False
        Catch ex As Exception
        End Try
    End Try
End Function
+3
2

, , , - 2 . :

  • DNS domain.se. , , www.domain.se, domain.se
  • (), 25 .

, DNS, MX Mail eXchange. , . , - .net, , , TYPE DNS ( , :)).

, , .. http://www.dart.com/ptmlvnet_overview.aspx. , , , , . , Google, " .net".

, , .

0

, A (ddress) "ecolog.se"

Dim entry As IPHostEntry = Dns.GetHostEntry(hostName)

A, Google MX:

$ host eco-log.se
eco-log.se mail is handled by 10 aspmx.l.google.com.
eco-log.se mail is handled by 20 alt1.aspmx.l.google.com.
eco-log.se mail is handled by 20 alt2.aspmx.l.google.com.
eco-log.se mail is handled by 30 aspmx2.googlemail.com.
eco-log.se mail is handled by 30 aspmx3.googlemail.com.
eco-log.se mail is handled by 30 aspmx4.googlemail.com.
eco-log.se mail is handled by 30 aspmx5.googlemail.com.

, ecolog.se eh-design.se , A:

$ host ecolog.se  
ecolog.se has address 213.188.129.183
$ host eh-design.se
eh-design.se has address 212.97.133.22
eh-design.se mail is handled by 10 mail4.surftown.se.

, MX, A, MX , .

0

All Articles