Re: VB code to check POP3 account



In article <42e91e7f$1@xxxxxxxxxxxxxxx>, David L. Beem wrote:
> Hello All,
> Regular lurker, irregular poster here. Sorry for pushing what should be
> my homework off, but I am looking for some hints to help me use less time &
> a push to get started. I thought of the application (maybe already done
> somewhere) a couple years ago & hadn't gone much further.
> The program would poll a distinct POP3 account on a regular basis to
> see if a message arrived in a particular format (see below). If a match, the
> text of the message goes through DDE to an alpha pager program to be sent to
> the correct pager. I've done the VB code to DDE to the alpha page program a
> few years ago, so it is only the POP3 polling I need help with.
> My alpha pager is from a distinct phone number & can have a message of
> up to 80 characters long (fills up quickly). The computer it will run on is
> constantly on the Internet through a dedicated connection (in fact runs
> network monitoring software to send out pages). Since there are multiple
> employees in the alpha page program (all able to be individually selected
> with the DDE link) the format will be as such:
>
> E-mail address polled: pager@xxxxxxxxxx
> Subject line: DDE entry for name of person to be paged (and will help stop
> spam from sending a page)
> Message body: text to be paged, probably truncated to 80 characters &
> converted to plain text
>
> VB6 is available to me. Even though there may be stand-alone
> applications that could be done (such as VB sending out the page itself), I
> want to keep it as planned (mainly for error checking being handled fine as
> it is). My DDE link program was done in VB3 or 4 I think, and I just have
> the executable (and original references to do a rewrite) now.
> TIA,
> David
> David@xxxxxxxxxxxxx
>
>

Well... I'm not sure how much TCP/IP experience you have, so I'll give
you some general information - and let you ask specific questions as
needed.

First, you need to decide how your going to interact with the pop3
server. There are a couple of ways I can think of off the top...

You could use outlook automation to do this, but then of course you are
then reliant on the presence of outlook. It that isn't a problem for
you then this may be an easy way to accomplish this - especially if the
POP3 server uses one of the alternative authentication methods.

You can of course get 3rd party POP3 controls, if you don't like the
above and you have to do something other then clear text authentication.
That would eliminate the reliance on outlook, and would most likely let
you more easily access more secure POP3 accounts.

Or you can use my prefered way... And that is just to use a socket and
just talk directly to the server. For the majority of pop servers, this
method will be just fine (actually, all of them would be just fine -
it's just that most just use a regular plain text login). The pop3
protocol is fairly simple. Connect to port 110, get a ready response,
and then start sending/recieving text. You will probably want to look
at the RFC for available commands and user authentication (there are 2
common ways to do this - USER/PASS and APOP) APOP is a little more
complicated because it involves the use of an MD5 hash to compute a
checksum.

As for the socket communication... There are a number of ways to do
that as well. I'm not sure which version of VB you have, but I know at
least Pro had the winsock control available. I can't give you much
advice on that, since I never used it much :)

You also have the choice of 3rd party socket controls. Again, I can't
give much advice here, since I didn't really use many. I did use a
control from Mabry for a few apps, and it worked well - but,
unfortunately, I'm not sure if it's still available.

And the last way, and my prefered method, is to just use the winsock API
directly. If you decide to go this way, I do have a file that has a lot
of the winsock api declared - including wrapper functions for some of
the common winsock macros and a couple of extra utility functions. I
would be willing to pass that along if you want it. To bad I never
finished that winsock typelib :)

--
Tom Shelton
.



Relevant Pages

  • Re: VB code to check POP3 account
    ... >> Regular lurker, irregular poster here. ... >> text of the message goes through DDE to an alpha pager program to be sent to ... so it is only the POP3 polling I need help with. ... > And the last way, and my prefered method, is to just use the winsock API ...
    (comp.lang.basic.visual.misc)
  • Re: VB code to check POP3 account
    ... > Regular lurker, irregular poster here. ... >text of the message goes through DDE to an alpha pager program to be sent to ... so it is only the POP3 polling I need help with. ... Original source was ...
    (comp.lang.basic.visual.misc)
  • looking for SSl Pop3 source / sample
    ... I understand winsock and pop3 but i am in need of source for SSL for pop3 ... not realy interested in payware dll type things ...
    (microsoft.public.vb.controls.internet)