Go Premium for a chance to win a PS4. Enter to Win


Sample C3PO to send email from Delphi application

Posted on 2014-03-05
Medium Priority
Last Modified: 2014-03-12
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?
Question by:bjones8888
  • 4
  • 4
LVL 33

Expert Comment

by:Dave Howe
ID: 39908792
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 :)
LVL 33

Expert Comment

by:Dave Howe
ID: 39908846
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.

Author Comment

ID: 39909245
@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?
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 33

Expert Comment

by:Dave Howe
ID: 39909369
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.

Author Comment

ID: 39909566
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?
LVL 33

Accepted Solution

Dave Howe earned 2000 total points
ID: 39910227
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.

Author Closing Comment

ID: 39910358
Thank you David for the links and advice.

Author Comment

ID: 39923689
@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?

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
Today as you open your Outlook, you witness an error message: “Outlook is using an old copy of your Outlook Data File…”. Probably, Outlook is accessing an old OST file.
The purpose of this video is to demonstrate how to set up Lists in Mailchimp. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchimp account. : Click on Lists. Click on Create List Button : Choose the desi…
This Micro Tutorial will demonstrate the easy use of Gmail embedding images in your email so the recipient of your email can view them in context.
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question