Hi,
I am having problems getting the recipient list before email send event.
I have registered a callback for EM_MAILSENDNOTE with EM_REG_BEFORE as the flag value. When I get the SendTo list with either MailGetMessageItemHandle or NSFItemInfo there is no valid data. And instead of a text list it always returns a text item. The text item has only junk.
I am using Notes C API toolkit 6.5.6 with my Notes client 8.0.
The address book resides in the mail server and no local copy is available.
But if press F9 and then click ‘Send Mail’ I get valid values. And also if I register the same callback for EM_REG_AFTER I get the valid values.
Is there a way to get the recipient list before mail send event?
Thank you for your help
Regards,
Vijay
Subject: Read recipient list before Mail Send : C API
Time ago I tried to do the same and I got same results than you.It seems Notes puts the recipients values in another place in the note… this is for security reason, else you can easily write an extension manager that would redirect all emails.
You can write the extension manager in the server and here you will be able to do it.
Registering the AFTER event does not help: Here if the router processes the document just before you have a chance to read the recipients in the client then you will have problems.
What do you want to do with the recipients? Read them? Modify them? Do something with the email based on this information?
Subject: RE: Read recipient list before Mail Send : C API
Yes we want to check if the mail is sent to authorised people or not.
I guess the recipients name should be somewhere in the note. Since after expanding names they are available even Before mail send.
Subject: SOLVED: Read recipient list before Mail Send : C API
I have found out the item that holds the recipients list.
Use NSFItemInfo and query for MAIL_ENTERSENDTO_ITEM… this item holds the TO list and there are similar items for CC and BCC…