刚学VB写了个发E-Mail的,其实就是想看看能不能发出去,可他就是发不出去,唉……忍了……
Private Sub Form_Load()
Text1.Text = "shitian_8569@hotmail.com"
End Sub
Private Sub Command1_Click()
Winsock1.LocalPort = 0
Winsock1.Protocol = sckTCPProtocol
Winsock1.RemoteHost = "smtp.email.msn.com"
Winsock1.RemotePort = 25
Winsock1.Connect
End Sub
Private Sub Winsock1_Connect()
Winsock1.SendData "HELO " & vbCrLf
Winsock1.SendData "MAIL FROM:" & Trim(Text1.Text) & vbCrLf
Winsock1.SendData "RCPT TO:" & Trim(Text1.Text) & vbCrLf
Winsock1.SendData "DATA" & vbCrLf
Winsock1.SendData "Subject:" & "发不出去啊!!!!!!哈哈哈哈哈哈" & vbCrLf
Winsock1.SendData "." & vbCrLf
Winsock1.SendData "QUIT" & vbCrLf
End Sub
哪位大侠有空看看给弄下,只要能发就成,上面那个就是我信箱……