FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Inbox Mail
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM
Inbox Mail
Posted: Wed Oct 22, 2008 02:31 PM

I want to read the messages in the inbox of Outlook or direct
from the pop server .
I want also to save the attached files (if present) in a defined folder .

I want to do that with a Fivewin program .

Thanks

Ph Jacquet (Belgium)

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Inbox Mail
Posted: Wed Oct 22, 2008 04:08 PM
Here is some code to read the Inbox. I don't have any for moving to a folder.

Regards,
James


#define olFolderInbox 6 

FUNCTION MAIN() 

    LOCAL oOutlook := CREATEOBJECT( "Outlook.Application" ) 
    LOCAL oNameSpace := oOutlook:GetNameSpace("MAPI") 
    LOCAL oInbox := oNameSpace:GetDefaultFolder( olFolderInbox ) 

    LOCAL i 

    FOR i = 1 TO oInbox:Items:Count 
        ? oInbox:Items[ i ]:Body 
        ? 
    NEXT 

    oOutlook:Quit() 

    RETURN NIL
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Inbox Mail
Posted: Thu Oct 23, 2008 11:36 AM

Mr.James,

Is there a similar way to read messages from Outlook Express ?

  • Ramesh babu P
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Inbox Mail
Posted: Thu Oct 23, 2008 09:04 PM

No, OE isn't an OLE server.

EMG

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Inbox Mail
Posted: Fri Oct 24, 2008 12:02 AM

James,

How can we handle attachments in your example ?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Inbox Mail
Posted: Fri Oct 24, 2008 05:00 PM

Michel,

>How can we handle attachments in your example ?

I don't know, I have never used it. You probably need to look at the Outlook OLE documentation.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion