This may not be quite as easy as you'd like.
A mail client (mail user agent: MUA) cannot receive email message as such. It is more of a presentation tool or user interface to your mailbox which normally resides within a mail server (mail delivery agent or MDA in combination with a mail transfer agent or MTA).
This means you'll need a "mail server" (typically an MDA paired with an MTA, or perhaps a combined MD/TA). The mail server is what receives email.
An MUA can "pull" email, but only from the stored messages in your mailbox. Since most Windows client systems don't run a mail server, remote retrieval protocols such as POP3 or IMAP4 are used to pull messages from the mail server's drop directory or mailstore.
It sounds as if you want a simple POP3 client.
However this client needs to have some way to distinguish among the received email messages stored at the mail server. There could be multiples of these, including spam or other unsolicited email messages.
It would be possible to create a custom POP3 client that browses the mailbox for messages and only pulls those of interest based upon the message length or size. Message number and length are the only two things a POP3 server normally returns on a POP3 "LIST" command from the client. Some servers could also return the sender and even the subject parsed from each mail message in this scan list, but they are not required to.
You could also just "drain" the mailbox and pull down all messages it contains. Then you can examine lots of other attributes like the sender, body text, attachments, etc. Those that are unexpected can be logged or simply discarded.
Even so, what if you find two or more messages in the mailbox that meet your criteria? What then? Process all of them? Use the first and discard the rest?
As far as the mechanics of creating a custom POP3 client in VB5 or 6 goes, you basically have three paths:
[ul][li]A MAPI client that piggybacks on a full mail client like Outlook or Outlook Express.[/li]
[li]A stand-alone POP3 client based on some 3rd party POP3 component flexible for your needs.[/li]
[li]A fully rolled-on-your-own POP3 client based on the Winsock control or Winsock API.[/li][/ul]
If you want IMAP4 access to your server the details vary but the overall plan of attack and component tool options are much the same.
More details on all of these approaches can be found by searching this forum. This may be a bit much to bite off for somebody "new to VB" though.
Perhaps you'd want to either hire a programmer or else search the Web for ready-made clients like the one you seek.