Results 1 to 8 of 8

Thread: POP3 Mail Retrieval

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205

    POP3 Mail Retrieval

    When i connect to my mail server using winsock, it cannot get to sckConnected state of 7. It gets to 6 which is connecting and just stays there. Is there something missing needed to allow the socket to establish a full connection?

    I get a data arrival but of course i cant use GetData at sckConnecting state because it causes a run time error. Help!!

  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    do you have the right port for your server?
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205
    Yeah, the port is fine. I did try it with another server and it worked, but the older version of the same program i wrote works fine and i havent changed any of the tcp winsock code. Any ideas or known bugs?

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205
    The only server it works with is my NTL server yet i can telnet into any of the other servers. You can telnet into my mail server if you telnet to ct.homeip.net on port 9150

    Try it. But the winsock never gets a response or actually it does but its not in the correct connection state to call GetData. If i call GetData it causes a runtime error because its in state 6 not 7. To be able to do anything with the connection it MUST be state 7.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205

    How stupid!!!!

    As you have probably guessed, i figured out why it didnt work. You need to have a doevents statement in after the connect so that VB can access the winsock.dll and establish a connection correctly, otherwise it doesnt establish one correctly and you get the problem i had. I put a do events in the send command and data arrival bit.

    cheers

  6. #6
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Why is your mail server running on port 9150? Most servers default to 110.

    Z.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    205
    just a security reason. Dont want any willy nilly logging into my server. So i use descrete ports.

    dont suppose you remember how to send keys to an application? Im trying to fill a password box with a password and press enter afterwards. I tried sendkeys, doesnt seem to work.

  8. #8
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Try AppActivate() first. Other then that... ::shrug::

    Z.

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