by Richard Hanning (3 Submissions)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 8th April 2003
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Sends email without using outlook,CDO,or opening up your default browser.
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
No comments have been posted about Sends email without using outlook,CDO,or opening up your default browser.. Why not be the first to post a comment about Sends email without using outlook,CDO,or opening up your default browser..