Home

  About me

  Links

  Contact me

  Disclaimer

  Impressum

Products


  - mv_Menu

  - Color-TV

  - db-Mutex

  - Form-Factor

  - OL-Plus package

  - URL-Download

  - Drop-Target

  - VdB_Mail

The OLPLUS-Package

The newer versions of MS Outlook (2000,XP,2003) have the possibility to customize their toolbar with so called add-ins. 
Thanks to this feature and the oleautoclient-object in dbase, the OLPLUS-package gives you the possibility to treat incoming emails from within your application.
After registering the OLPLUS dll, you will find a supplemental button in your version of MS Outlook. Part of the OLPLUS-package is a custom control (Paintbox) that can be used in your dbL-application (32 Bit only). These two components establish the smooth connection between your dbase program and Outlook as Mail server.

How does it work?

If you click the toolbar button, the first action of the add-in is to retrieve the unique EntryIDs of the selected mail-items (one or more). Then it tries to connect to the dbase paintbox. If your application is running, the Ids are transferred immediately, if not, the Ids are stored temporary and the next time your program starts, the paintbox will "see" the pending mails and read the Ids.

How to access the content of the mails?

Once the paintbox has the EntryIds (the unique identifier for each mail), it creates an oleautoclient-object that connects to Outlook and finds the mail-items corresponding to the IDs. The content of the mail item in question is accessed via oleautomation. This has the great advantage, that you can read all properties independent of the actual version of Outlook and that you have the full control not only over the properties, but also all methods (you could f.i. remove the mail from the inbox, once it has been processed in dbase). For ease of use, the most important properties are concentrated in an email class :

-Class fmail of object
this.Attachments = new array() // object representing attachments
this.nAtc = 0 // number of attachments 
this.BCC = "" // BCC
this.Body = "" // Body (without HTML)
this.BodyFormat = "" // -1,0,1,2 ; 0=Plain Text ; 1=RTF ; 2=HTML -1 = unknown
this.CC = "" // CC
this.CreationTime = "" // CreationTime
this.EntryID = "" // unique identifier
this.HTMLBody = "" // HTMLBody
this.RRR = "" // ReadReceiptRequest (logical value)
this.RbyName = "" // ReceivedbyName
this.ReceivedTime = "" // Receivedtime
this.S_Email = "" // SenderEmailAddress
this.SenderName = "" // SenderName (if known in addressbook, else email-address)
this.SentOn = "" // Date when mail was sent
this.Size = "" // Size of the mail in bytes)
this.Subject = "" // Subject
this.To = "" // destination address
this.Unread = "" // logical value : Read/Unread
this.Main = "" // an outlook mail-object, surfacing ALL properties and methods 
// to be able to use the main-object, you must know the 
// Outlook-Object-Modell with its names. 

And the MS Security politics?

Microsoft has adopted a very restrictive security politic with the versions XP and 2003. Each time an application wants to retrieve the value of a certain property, a MessageBox pops up and asks the user to confirm access.
The OLPLUS package contains one more dll (trustedOL.dll). To make the process as transparent as possible, it ensures, that the access is granted without the prior Outlook-Security-MessageBox. 

Customization

You can customize the bitmap of the add-in-button to fit best with your application (showing your icon f.i). It is enough to copy a bitmap called plus.bmp to the directory of the package. The same way you can adapt the name of the command bar and speed tip (plus.txt).
If you change these two files, you must unregister and register the olplus.dll in order to update the add-in.

Content
The OLPLUS-package comes with 7 files:

- olplus.dll - holds the code for the add-in
- trustedol.dll - access without Outlook-security-Msgbox 
- ol_a.cc - paintbox object; dbase part of the OLPLUS package
- test.wfm - sample form to demonstrate the mail processing
- mailprocess.cc - part of test.wfm
- plus.bmp - contains the image for the add-in-button 
- plus.txt - contains the speedtip

extract all the files to a same directory and run the testform. If you want, you could arrange the windows in such way, that test.wfm and OL are visible at the same time (make sure, to start test.wfm first). The mail-items will appear in the listbox as soon as you click the add-in-button. If you choose to remove an item from within dbase, you can see that it disappears immediately in Outlook.
The testform holds all the code to show you how to handle attachments.

Price

There is a free evaluation version, that comes with co-files and a Msgbox popping up after the processing of mails.
The full version without MsgBox, including the source code costs 99,-Euro.



 

Web site and all contents © Copyright Marc Van den Berghen 2008, All rights reserved.