- Home
·
- Internet/HTML
·
- Sends email without using outlook,CDO,or opening up your default browser.
Sends email without using outlook,CDO,or opening up your default browser.
Sends email without using outlook,CDO,or opening up your default browser.
Rate Sends email without using outlook,CDO,or opening up your default browser.
(1(1 Vote))
Private Sub Command1_Click() 'the Send buton
wskEmail.Close
Counter = 0
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() 'close connection button
Timer1.Enabled = False
Counter = 0
wskEmail.Close
End Sub
Private Sub Command3_Click() 'clear fields button
txtFrom.Text = ""
txtRcpt.Text = ""
txtSubject.Text = ""
txtBody.Text = ""
Text1.Text = ""
End Sub
Private Sub menuExit_Click()
wskEmail.Close
End
End Sub
Private Sub Timer1_Timer() 'the timer's interval should be set to 2000
On Error Resume Next
Counter = Counter + 1
'this waits 2 seconds(or howeverlong the timer's interval is)
'until it sends the next data
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 Incoming As String
wskEmail.GetData Incomming 'get incoming data
Text1.Text = Incoming & vbCrLf & Text1.Text
End Sub
Sends email without using outlook,CDO,or opening up your default browser. Comments
No comments yet — be the first to post one!
Post a Comment