Jump to content

Get access to IMAP server using TCP


Recommended Posts

I am trying to get access to yahoo IMAP server by means of TCP. But the server does not response. I think that the reason is ssl, using by the server. This example does not work as well. Here is the script for connecting the server:

;Host Name  : imap.mail.yahoo.com
;IP Address : 217.146.190.234 and 77.238.185.51

Example()

Func Example()
    Local $result = TCPStartup() ; Start the TCP service.
    MsgBox(0,"", "The result of TCPStartup() = " & $result)
    Local $iSocket = TCPConnect("217.146.190.234", 993)
    MsgBox(0,"", "The result of TCPConnect = " & $iSocket & @LF & "@error = " & @error)
    $result = TCPSend($iSocket, StringToBinary('capability', 4))
    Local $response = TCPRecv($iSocket, 64, 1)
    Local $error = @error
    MsgBox(0,"", "The result of TCPSend() = " & $result & @LF & "The result of TCPRecv() = " & $response & @LF & "@error = " & $error)

    ; Register OnAutoItExit to be called when the script is closed.
    OnAutoItExitRegister("OnAutoItExit")
EndFunc   ;==>Example

Func OnAutoItExit()
    $result = TCPShutdown() ; Close the TCP service.
    MsgBox(0,"", "The result of TCPShutdown() = " & $result)
EndFunc   ;==>OnAutoItExit

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...