CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2000
    Location
    Alberta, Canada
    Posts
    25

    Problem of SMTP & Winsock

    I use the following steps to send my messages
    Winsock.Connect - HELO - MAIL - RCPT-DATA - QUIT - Winsock.Close
    when next time I send another message and try to repeat the sequence above, It took me forever to get response ( 220 - SMTP ready) from SMTP server after call Winsock.connect and stock there.

    If I remove Command "QUIT" (Winsock.Connect - HELO - MAIL - RCPT-DATA - Winsock.Close) from the steps, it works fine. Does anyone know why?

    I had the error event (sckTimedout) after I run my program for long time, the error occur right after "HELO" once a while. I am wondering if this was caused by the SMTP server timeout due to I did not use "QUIT" to discoonect the SMTP transimmision channel.

    I am confused by the difference between "QUIT" and Winsock.close. When Winsock Close event occur after Send "QUIT" command, but if I just use Winsock.Close method, never fire the Close Event.

    I also have another question about command "NOOP". Can use NOOP anywhere? If I use NOOP, it means SMTP never be disconnected by timeout due to no data transmission?

    Yiping



  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: Problem of SMTP & Winsock

    sample code can be found in http://vbLib.virtualave.net in class vbPop3.


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

Featured