|
-
Aug 31st, 2000, 01:56 PM
#1
Thread Starter
Lively Member
Public Sub Wait(WaitTime)
Dim StartTime As Double
StartTime = Timer
Do While Timer < StartTime + WaitTime
If Timer > 86395 Or Timer = 0 Then
Exit Do
End If
DoEvents
Loop
End Sub
above is my code to wait ... if i dont put this inbetween the senddata function, my winsock doesn't send the data necessary. But all of the codes work fine, just the fact that it doesn't send!!! here's my sending code
Code:
Wait 0.5
wsk.SendData "EHLO " & wsk.LocalIP & vbCrLf
wsk.SendData "MAIL FROM:" & strFrom & vbCrLf
Wait 0.5
wsk.SendData "RCPT TO:" & strTo & vbCrLf
wsk.SendData "DATA" & vbCrLf
Wait 0.5
wsk.SendData "MIME-Version: 1.0" & vbCrLf
wsk.SendData "From: " & ExtractArgument(1, strFrom, "@") & " <" & strFrom & ">" & vbCrLf
wsk.SendData "To: <" & strTo & ">" & vbCrLf
wsk.SendData "Subject: " & strSubject & vbCrLf
wsk.SendData "Content-Type: multipart/mixed;" & vbCrLf
wsk.SendData " boundary=Unique-Boundary" & vbCrLf & vbCrLf
wsk.SendData " [ Random garbage here ]" & vbCrLf & vbCrLf
wsk.SendData vbCrLf & "--Unique-Boundary" & vbCrLf
wsk.SendData "Content-type: text/plain; charset=US-ASCII" & vbCrLf & vbCrLf
wsk.SendData strBody.Text & vbCrLf & vbCrLf
wsk.SendData vbCrLf & "." & vbCrLf
Wait 0.5
wsk.SendData "QUIT" & vbCrLf
Wait 0.5
wsk.Close
-
Aug 31st, 2000, 04:02 PM
#2
Thread Starter
Lively Member
vb says method not found when i use the code Winsock1.StillExecuting... help
-
Aug 31st, 2000, 04:08 PM
#3
Monday Morning Lunatic
Oh crap...I'm not thinking straight. That's for the Internet Transfer Control . Ignore that...
Code:
While Winsock1.State = sckConnected
DoEvents
Wend
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|