- Home
·
- Internet/HTML
·
- Sends email without opening up default email sender, or outlook, or CDO.
Sends email without opening up default email sender, or outlook, or CDO.
Sends email without opening up default email sender, or outlook, or CDO.
Rate Sends email without opening up default email sender, or outlook, or CDO.
(1(1 Vote))
Private Sub Command1_Click()
If txtFrom.Text <> "" And txtRcpt.Text <> "" And txtSubject.Text <> "" And txtBody.Text <> "" Then
wskEmail.Connect "mail.hotmail.com", 25
Timer1.Enabled = True
End If
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
wskEmail.Close
End Sub
Private Sub Form_Load()
Dim MyIP As String
MyIP = wskEmail.LocalHostName & "'s " & "IP address is " & wskEmail.LocalIP
Label1.Caption = MyIP
End Sub
Private Sub menuExit_Click()
wskEmail.Close
End
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
Counter = Counter + 1
If Counter = 1 Then
wskEmail.SendData "helo" & vbCrLf
ElseIf Counter = 2 Then
wskEmail.SendData "mail from: " & txtFrom.Text & vbCrLf
ElseIf Counter = 3 Then
wskEmail.SendData "rcpt to: " & txtRcpt.Text & vbCrLf
ElseIf Counter = 4 Then
wskEmail.SendData "data" & vbCrLf
ElseIf Counter = 5 Then
wskEmail.SendData "subject: " & txtSubject.Text & vbCrLf
ElseIf Counter = 6 Then
wskEmail.SendData vbCrLf
ElseIf Counter = 7 Then
wskEmail.SendData txtBody.Text & vbCrLf
ElseIf Counter = 8 Then
wskEmail.SendData "." & vbCrLf
ElseIf Counter = 9 Then
wskEmail.SendData "quit" & vbCrLf
Timer1.Enabled = False
End If
End Sub
Private Sub wskEmail_DataArrival(ByVal bytesTotal As Long)
Dim Incomming As String
wskEmail.GetData Incomming
Text1.Text = Incomming & vbCrLf & Text1.Text
End Sub
Sends email without opening up default email sender, or outlook, or CDO. Comments
No comments yet — be the first to post one!
Post a Comment