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?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave HoweSoftware and Hardware EngineerCommented:
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 :)
Dave HoweSoftware and Hardware EngineerCommented:
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.
bjones8888PresidentAuthor Commented:
@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?
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Dave HoweSoftware and Hardware EngineerCommented:
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.
bjones8888PresidentAuthor Commented:
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?
Dave HoweSoftware and Hardware EngineerCommented:
I seem to recall there are C3PO samples on the site, but sadly I long since discarded my gw dev environment.

You can save a message in any format you choose, after all, it will start out life as a gw msg object with drilldown to the various parts as properties or collections, but you will largely have to do the required building of the output yourself. I seem to recall a getMIME method for emails though that returned the raw message, suitable to be stored as a .EML, but of course missing all the bits of groupwise specific data that can't be stored in RFC 822 format.

GW has a rich superset of normal email - taskflow management, annotations, links to shared documents in the gw libraries and so forth) which are hard to represent outside of the system they are in.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bjones8888PresidentAuthor Commented:
Thank you David for the links and advice.
bjones8888PresidentAuthor Commented:
@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?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Software

From novice to tech pro — start learning today.