CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Posts
    41

    Working with POP3 from Win32 application

    Hi

    Please help me choose how (an API, component, library etc) can I work with POP3 in the following task. I have no experience with POP3 and do not know where to start.

    I have C++ Win32-application (MS Visual C++ 2005 or 2008) that must:
    - periodically (say once in 5 min) check a mailbox via POP3
    - retrieve new messages from there, process them (the processing is specific for the my task) and remove the processed messages.


    The question is: what (an API, component, library etc) should be used for this task? Most probably there will be several solutions - if so, please recommend better one.

    If, say, there is a ready component that resolves the task, but it is implemented on .Net - how easy to integrate it with C++ application?

    Thanx

  2. #2
    Join Date
    Feb 2005
    Posts
    2,160

    Re: Working with POP3 from Win32 application

    POP is a simple text based protocol which can easily be implemented by just opening a socket to the POP server and send/recv commands to/from the socket. The protocol is described in RFC1939:

    http://www.faqs.org/rfcs/rfc1939.html

    There's really only a few required commands:

    USER name
    PASS string
    QUIT
    STAT
    LIST [msg]
    RETR msg
    DELE msg
    NOOP
    RSET
    QUIT

    You can do it yourself with a telnet client by just telneting to port 110 and typing the commands.

  3. #3
    Join Date
    Sep 2006
    Posts
    41

    Re: Working with POP3 from Win32 application

    Thank you for the replies

    During this time my task became more complicated (:-)) Now I should not only receive mails via POP3 but also convert body of received mail into plain text (WCHAR* string). I mean: to convert removing formatting elements like HTML tags (when a mail is in HTML format) etc., leaving only text. Now I am not interested in content of attachments - I need only mail's text.

    The question is: do you know a component that can solve the task too? Or: one component to read POP3, another one for extracting text from received e-mail. The components may be commercial ones (my employer is rich enough to pay for them ;-)

  4. #4
    Join Date
    Feb 2005
    Posts
    2,160

    Re: Working with POP3 from Win32 application

    Sorry, I don't know of anything that will parse HTML. Perhaps the IE web browser component with its plethora of sparsely documented interfaces,or the MAPI could do this, but I've never tried.

Tags for this Thread

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