About Duffbert...

Duffbert's Random Musings is a blog where I talk about whatever happens to be running through my head at any given moment... I'm Thomas Duff, and you can find out more about me here...

Email Me!

Search This Site!

Custom Search

I'm published!

Co-author of the book IBM Lotus Sametime 8 Essentials: A User's Guide
SametimeBookCoverImage.jpg

Purchase on Amazon

Co-author of the book IBM Sametime 8.5.2 Administration Guide
SametimeAdminBookCoverImage.jpg

Purchase on Amazon

MiscLinks

Visitor Count...



View My Stats

« Book Review - City Of The Dead by Brian Keene | Main| Book Review - Terminal by Brian Keene »

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.

Comments

Gravatar Image1 - The note is only put in the Sent folder if it is saved. Don't save it.

Gravatar Image2 - Don't create it in the mailfile, create it only in the mailbox ) !!

Gravatar Image3 - Well... *that* sounds like a "d'oh!" moment!

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Want to support this blog or just say thanks?

When you shop Amazon, start your shopping experience here.

When you do that, all your purchases during that session earn me an affiliate commission via the Amazon Affiliate program. You don't have to buy the book I linked you to (although I wouldn't complain!). Simply use that as your starting point.

Thanks!

Thomas "Duffbert" Duff

Ads of Relevance...