Results 1 to 3 of 3

Thread: winsock help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Ca
    Posts
    106

    Question

    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

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Ca
    Posts
    106
    vb says method not found when i use the code Winsock1.StillExecuting... help

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
  •  



Click Here to Expand Forum to Full Width