Link to home
Start Free TrialLog in
Avatar of bjones8888
bjones8888Flag for United States of America

asked on

Sample C3PO to send email from Delphi application

I have a Delphi 5 application that integrates well with Outlook and Lotus Notes.  I now have a client that wants the same for Groupwise.  They're using Groupwise 12 (32 bit).  

What I want to be able to do is
1. click a button in my Delphi application, and using OLE Automation (must be late binding), initiate an email message
2. pre-populate some information,
3. turn control over to the user, allowing them to complete the message and click Send
4. Trap the Send event (or sent event) and save the message itself to a file
5. attach that file to data in my sql database.

My guess is that the first part isn't difficult, because I can do that from within my Delphi application.  I just need to know what the Ole Object name is, what the fields are called to prepopulate, etc.

Does GW allow you to put custom properties on a message, as Outlook does?  I need to somehow tag the message with a couple of values so that the C3PO could "recognize" the identifier in my SQL database to attach it to.

If there's sample code out there for me to do this, that would be great.

Another hurdle is that I don't have a GW infrastructure installed so that I could test this.  

Any suggestions?
Avatar of Dave Howe
Dave Howe
Flag of United Kingdom of Great Britain and Northern Ireland image

We don't have GW12 yet, but in earlier versions, there is a decent (and scriptable!) set of activex objects installed with the client - I imagine they are kept, given the amount of code out there that uses them.

gwcma1.dll - full control over the locally installed client, including use of the Trusted App login mode(!)

gwcmb1.dll - full control over the server side, including post offices and domains, equivalent of using the groupwise gui admin tools.

there are others, but in practice, if you can do it at all, you can do it using those two.  You CAN use C3PO, but that's more of use for writing addons for the client than using GW for backend automation.

See HERE for further details :)
oh, and you can download and install the whole thing into a VM fairly painlessly - I usually prefer OES2/Linux, but you could also install eDirectory on a windows VM, along with Groupwise and both the novell client and groupwise client - have a test setup myself like that a few times, for Dev or testing purposes, it works just fine on a Win2003 VM.
Avatar of bjones8888

ASKER

@DaveHowe - Very helpful.  Do you know if there is a downloadable VM with these already installed?  

Also, the gwcma1.dll - do you know what language that is already using?  I have Visual Studio 2010 & 2012, as well as Delphi XE4 at my disposal.  Or is this more like Lotus Notes, which has its own scripting language?
I don't know of such a beast, sorry. I have tended to build them at need, and given my employer has decided to no longer be a Novell reseller, I no longer need to.

the dll is a scriptable activex control - I mostly use it for quick-and-dirty admin from a vba/vbs environment (I have a small access db that can do things you would swear needed a commerical package)

This may be useful to you - it has numerous examples of delphi code.
Very helpful, David.  

Any idea where I can find a GW programmer to create the DLL / EXE for me?  At this point I don't care if it is Delphi or VB.  I just don't have the time to create it in the first place, but I don't mind maintain it myself long term.

I know that what I'd like to ultimately accomplish is to modify the GW client (put an icon or menu option) for one of the features, so it will require C3PO.

Do you know if a message can be saved as a file in PDF or EML or MSG format?
ASKER CERTIFIED SOLUTION
Avatar of Dave Howe
Dave Howe
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you David for the links and advice.
@David - do you know if it is possible to add a custom property to a GW mail item?

The way we do the Outlook integration is that from our case management system we instantiate a new message object (using COM) and tag it with a couple of hidden custom properties, so that it can be associated with the proper record id in our SQL database.

If that functionality doesn't exist with GW, I will have to take a different approach when I hook to the save event for the GW email initiated from within our application.

Secondarily, do you have any suggestions as to where I can locate a programmer willing to do this (hopefully simple) task?