Solved

Sample C3PO to send email from Delphi application

Posted on 2014-03-05
8
506 Views
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?
0
Comment
Question by:bjones8888
  • 4
  • 4
8 Comments
 
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 :)
0
 
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.
0
 

Author Comment

by:bjones8888
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?
0
 
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.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:bjones8888
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?
0
 
LVL 33

Accepted Solution

by:
Dave Howe earned 500 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.
0
 

Author Closing Comment

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

Author Comment

by:bjones8888
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?
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article will describe some of the best ways to process an ex-employee from an Office 365 subscription. I will describe the methods I would recommend when the data needs to be kept for the ex-employee as well as how to manage any new email as we…
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
This Micro Tutorial demonstrates  how Internet marketers work with competitive analysis data, and a common task in data preparation is creating separate column for domains. You will then extract from a list of URLs.
In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now