OfficeDev / Outlook-Add-in-On-Send

Learn how to check for restricted words in an Outlook email message body, add a recipient to the CC line and check that there is a subject in the email on send.
MIT License
35 stars 31 forks source link

Adding attendees and send doesn't work #22

Closed moshikonachmias closed 4 years ago

moshikonachmias commented 4 years ago

I've tested at your example with setting the subject and send (subjectOnSendChange) and it worked fine. But, in my case, I want to change the attendees (required / optional - does not matter) and send the Appointment. When I'm doing that I got a notification saying 'Couldn't save event'. I've tried with setAsync and addAsync and both not working (obviously I prefer the addAsync function).

I've attached the code and a GIF (I've made it slower for better understanding).

ezgif com-video-to-gif

var mailboxItem;

Office.initialize = function () { mailboxItem = Office.context.mailbox.item; };

function itemSendHandler(event) { mailboxItem.requiredAttendees.addAsync(['shekhar.kanade@regoconsulting.com'], {asyncContext: event }); event.completed({ allowEvent: true }); }

moshikonachmias commented 4 years ago

Please remove this issue. Apparently it was caused because of a problem with my account.