views:

562

answers:

2

Trying to add a custom header item to a Lotus Notes email item, from the context of a Notes Client Extension before the mail is sent from the Lotus Notes client app.

Is this possible?

I'm looking along the lines of using something in the NSFItemSetText family of functions if at all possible, as opposed to the lotus script object model which I gather is COM components.

I'm implementing this in inherited code and have no reference on where I should be looking for a tutorial on this sort of thing.

Basic googling has led me into the realms of the horrible IBM reference site, and there simply must be something out there better than that.

A: 

The NotesMimeEntity and NotesMimeHeader classes should give you the capabilities you need. I assume you have access to the Notes Developer client, so check out the Developer Help for some good examples on usage.

I've only used these classes from within LotusScript, and I'm not sure if they work differently or at all via COM.

Ken Pespisa
It seems NotesMimeEntity and NotesMimeHeader are both part of the lotusscript api but I'm inside a notes extension using the native c++ api.
Dan
+1  A: 

You can add headers using the MailAddHeaderItem function, which is in mailsrv.h

If your using NSFItemSetText you might have code based on the SENDMEMO example. Have a Look at the SENDMAIL example which references using MailAddHeaderItemByHandle. The examples are included in the C api toolkit which you can download here if you don't already have it.

kerrr