Click to See Complete Forum and Search --> : Lotus Notes C++ API
Graeme Seiffert
April 8th, 1999, 05:34 AM
I have been developing an C++ application in NT which uses the Notes C++ API. I have noticed that there is a small memory leak which seems to be associated with reading mail messages. Does anyone know of a fix?
Michael Decker
May 12th, 1999, 09:35 AM
Are you using the VIM library?
I need to send a simple Notes message with an attachment from a Windows application. Have you done this?
Graeme Seiffert
May 12th, 1999, 10:01 AM
I am using Lotus Notes C++ API directly. As my project is designed to work with a range of mail systems I have also worked with MAPI and managed to get MAPI to work with Notes.
In reply to your question I also needed to send (and read) emails with attachment. I haven't used VIM, but for both MAPI and the Notes API, having created your mail message object, you can attach files to it specifying the full path of the file. If you are working with email and Notes I would suggest getting hold of the API (C or C++), which you can download from the Notes web site. I found it a bit over-elaborate and counter-intuitive, but once you get your head round it you'll find it's more reliable than going via MAPI as Notes doesn't always follow the MAPI spec 100%.
Michael Decker
May 12th, 1999, 10:22 AM
At the present time I'm using MAPI and attaching the files, but the customer wants to use Lotus Notes. Is there a trick to getting MAPI to work with Notes?
The only SDK that I saw on the Lotus web site was the VIM sdk. Is this different than the Notes C++ API that you mention?
All I want to do is tell the SDK/API what files are to be attached and have it prompt the user for the rest of the info (recipient, subject, etc.). Do you have an example of something like this?
Graeme Seiffert
May 12th, 1999, 11:07 AM
I don't know about your level of Notes/MAPI knowledge so apologies if I'm stating the obvious.
You need to install a Notes client on the relevant machine, and then set up a MAPI profile which uses Notes. That is during the MAPI profile setup select Notes as the messaging system you want to use rather than Microsoft Mail or Exchange or whatever. A good tip is then to try to use this new profile with a 'standard' MAPI client like Outlook. If Outlook works OK then so should your MAPI stuff. I sometimes found that I had to mess around with the settings for the 'address books to use' in the MAPI profile before everything worked smoothly. I also found a couple of pitfalls when coding. If the Notes account you are using has a password then you will NOT be able to enter that via MAPI, at best you will get Notes throwing up it's own prompt, even if your program has no UI! As a rule it's best to work with accounts without passwords. If password protection IS required then you will HAVE to use the Notes API, also the password stuff is a bit of a headache even then. Another curiousity was that when reading messages in the Notes Inbox, the MAPI 'only look for unread messages' flag caused the read operation to fail (??). I never got to the bottom of that one, instead I started learning to use the Notes API.
Graeme Seiffert
May 12th, 1999, 11:18 AM
I actually only answered your first question!
One book I have used is 'Inside MAPI' by De la Cruz and Thaler from the Microsoft Press. That's got loads of sample code on a CD, including a simple but fully functional MAPI email client which effectively does all the things you mention. There is also sample code with the microsoft developer library. It may also be worth looking at the microsoft web site.
Finally VIM is different to the Notes API - I say this but I don't really know anything about VIM!
The Notes site is pretty big, it took me a little while to find it, but the API was there last time I looked. If you're happy with MAPI and it can do everything you want, then don't bother with the Notes API. It'll take you as long to learn as extended MAPI. If you're just using Simple MAPI then think of it as taking a LOT longer to learn.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.