Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21843

winsock email (hotmail) server commands

$
0
0
i have no idea how to work with winsock but i came up with this with a little bit of research on the internet

just add winsock1 to form
Code:

Private Sub Form_Load()
Me.Width = 5000
Me.Height = 5000
Winsock1.LocalPort = 0
Winsock1.RemoteHost = "smtp.live.com"
Winsock1.RemotePort = 587
Winsock1.Connect
End Sub

Private Sub Winsock1_Connect()
Winsock1.SendData "STARTTLS " & vbCrLf & "EHLO " & "MAX" & vbCrLf & "STARTTLS " & vbCrLf
If WaitFor("235") Or WaitFor("250") Then Me.Print SockData
Winsock1.Close
End Sub


Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Winsock1.GetData SockData
End Sub



Private Function WaitFor(SockResponse As String) As Boolean
Do While Left(SockData, 3) <> SockResponse And Left(SockData, 3) <> "220" And Left(SockData, 3) <> "250"
  DoEvents
  If Left(SockData, 3) > "400" Then Exit Function
Loop
WaitFor = 1
SockData = ""
End Function


so now i get these commands
Code:

250-TLS503 5.5.2 Send hello first
250-BLU0-SMTP58.blu0.hotmail.com Hello [xxx.xx.x.xxx]  '***IP ADRESS
250-TURN
250-SIZE 41943040 '***NUMBER CHANGES
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-TLS
250-STARTTLS
250 OK
220 2.0.0 SMTP server ready

how can i use any of these commands? or how can i log in my username?

Viewing all articles
Browse latest Browse all 21843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>