Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can one scan In-Box of MS-Outlook Express? 3

Status
Not open for further replies.

delphiman

Programmer
Dec 13, 2001
422
ZA
I need to scan the In-Box of MS-Outlook Express but
more specifically I need to read the contents of the Subject line in a search for known characters. Such as "REGISTRATION".

The intention being to then save known attachments to specific already exisiting directories.

Does anyone have any experience on this?
Or is there somewhere where I can find something on this?
 
Delphiman,

To make your (Delphi)life much easier, switch to MS Outlook (98(!) or later). It has a very well defined interface, and there is a lot of knowledge about this subject in this group. The Outlook Express database is a closed system, that I haven't been able to crack. After I found it was quite hard, I just moved over to Outlook, and all (me) was well ;-)

HTH
TonHu
 
Rather than work with Outlook or OE, you could discard that requirement and add an POP3 or IMAP component directly to your Delphi app so it can download the messages from your ISP directly.
 
Thanks for your input guys! :)

But Griffyn one has to be careful with MAPI because there are different versions for different versions of Windows.

Any further views on that?
 
Griffyn ... I should have asked.

Could you please be so kind as to give me the minimum amount of code (whatever I need) to be able to do what you suggest in using a POP3 component. Where would one find such an animal anyway. :)
 
I don't know what version of Delphi you're using - check out
I'm pretty sure it's still freeware. And they're components are pretty good. I've written a couple of mail checking programs. Have a download and a squiz, and post back if you need more help getting them to work.
 
>I don't know what version of Delphi you're using

Delphi 6 Enterprise.

>check out
Been there. Lot of interesting looking stuff there.
What do you reckon mere mortals should focus on (downloading?)

Thanks in advance.
 
Delphi 6 Enterprise already has the Indy package installed. However, I highly recommend you download the latest update of the Indy Direct package from that website. They have full instructions on how to install it. I'm pretty sure you have to remove the existing version first, by running the Delphi setup and unticking the Indy package option.

The package comes with a pile of demo applications, which includes a mail program. The latest version on the website splits up their components on to 5 separate component toolbars.

But - basically, on the Indy Clients component toolbar, whack either an idIMAP4, or idPOP3 component onto your form. Their help system gets integrated into the main Delphi help file, so just click the component and hit F1 to get the full details on properties and methods.

So - use an IMAP component if you want to manipulate a message on the server, and use a POP3 component if you want to download the message from the server and do what you like. For example, if you want to grab an attachment from a message, and then remove it from the e-mail, but leave the e-mail on the server, use the IMAP. But if you want the attachment, and then discard the message, just use the POP3 component.

I highly recommend you have a play, and scour the help files on your component of choice, and then come back here if you can't figure it out.

But as a guide, you should programmatically set up the component to access the mail server, grab the message after checking the subject line (which I don't think you can do with a POP3 component without downloading the entire message), retrieving the messages (each will become a TidMessage object), then asking the TidMessage to save any attachments.

Good luck!

Daryl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top