I am creating an Outlook.application object in asp to allow the users to get an Outlook window, filled in with relevant details and attachments. This works okay. However, I need to capture the event caused by them pressing the Send button in the Outlook window, so I can write information about what they send to a database.
I can't work out how to capture this event within my asp code.
The code is shown below:
var myRecipient = "<firstname.lastname@example.org>"
var mySubject = "test"
var myBody = "This is a test message"
var myOutlook = new ActiveXObject("Outlook.Application");
// this works
function SendMail (recipient, subject, body)
var myNameSpace = myOutlook.GetNameSpace("MAPI").CurrentUser;
var myMailItem = myOutlook.CreateItem(0);
myMailItem.Subject = (subject);
myMailItem.Body = (body);
// this doesn't work
alert ("called ItemSend");
SendMail (myRecipient, mySubject, myBody)
alert ("Finished Sending Mail");