Solved

Sample C3PO to send email from Delphi application

Posted on 2014-03-05
8
510 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Email attacks are the most efficient and effective way for cyber criminals and hackers to compromise a computer or network. We often find our-self second guessing the authenticity of an email message, for such instances we can follow practical princ…
An analysis of the phishing scam that has been affecting Google users, along with steps to take for protection, as well as what to do if you receive one of the emails.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

895 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

15 Experts available now in Live!

Get 1:1 Help Now