Any Notes C API experts willing to help a reader?
Category IBM/Lotus
I got the following email from a reader the other day. I've never worked with the C API, so I'm not the right person to answer this. But I have no doubt that someone out there has an answer or a tip to pursue... Feel free to jump in and comment...
I have a Notes programming issue which I have not been able to track down on the IBM site or anywhere else. I am wondering if you are willing/able to help me.
I have a C++ program which (among other things) sends Notes mail. When it sends a mail message, a copy of the mail message is saved in the Sent folder of the user’s mail database. I need to suppress this behavior.
If I were using the Domino COM objects, I would code as follows:
doc.SaveMessageOnSend = False
doc.Send
But I’m not. I am coding to the Notes C API:
NSFDbOpen (szMailBoxPath, &hMailBox)
. . . etc . . .
NSFDbCopyNote(hSource, NULL, NULL, noteID, hMailBox, NULL, NULL, NULL, NULL);
NSFDbClose(hMailBox);
where “hMailBox” is the handle to the mail.box database and “hSource” is the handle to the user’s mail database, etc.
But how do I code the C equivalent of “SaveMessageOnSend = false”?
I assume that the note to be mailed has a Note Item corresponding to “SaveMessageOnSend”, so that if I knew the name of that item, I could code:
NSFItemSetText(hDocument, “field-name”, “0”, (WORD)1);
if only I knew what the “field-name” was.
I got the following email from a reader the other day. I've never worked with the C API, so I'm not the right person to answer this. But I have no doubt that someone out there has an answer or a tip to pursue... Feel free to jump in and comment...
I have a Notes programming issue which I have not been able to track down on the IBM site or anywhere else. I am wondering if you are willing/able to help me.
I have a C++ program which (among other things) sends Notes mail. When it sends a mail message, a copy of the mail message is saved in the Sent folder of the user’s mail database. I need to suppress this behavior.
If I were using the Domino COM objects, I would code as follows:
doc.SaveMessageOnSend = False
doc.Send
But I’m not. I am coding to the Notes C API:
NSFDbOpen (szMailBoxPath, &hMailBox)
. . . etc . . .
NSFDbCopyNote(hSource, NULL, NULL, noteID, hMailBox, NULL, NULL, NULL, NULL);
NSFDbClose(hMailBox);
where “hMailBox” is the handle to the mail.box database and “hSource” is the handle to the user’s mail database, etc.
But how do I code the C equivalent of “SaveMessageOnSend = false”?
I assume that the note to be mailed has a Note Item corresponding to “SaveMessageOnSend”, so that if I knew the name of that item, I could code:
NSFItemSetText(hDocument, “field-name”, “0”, (WORD)1);
if only I knew what the “field-name” was.



Comments
Posted by Ben Langhinrichs At 18:10:13 On 04/12/2005 | - Website - |
Posted by Werner Novak At 10:54:00 On 06/12/2005 | - Website - |
Posted by Duffbert At 20:32:48 On 04/12/2005 | - Website - |