Skip to content

Instantly share code, notes, and snippets.

Created Jun 12, 2017
What would you like to do?
OnSend JavaScript Function
var sendEvent;
function onSendEvent(event) {
/// <summary>
/// Entry point for Message onSend event
/// Per example:
/// Setup mailbox policy first:
/// 1) Get sessions and commands:
/// 2) Set policy and more info:
/// </summary>
/// <param name="event" type="object">ItemSend event is automatically passed by on send code to the function
// specified in the manifest.</param>
sendEvent = event;
// do your work here... since it will likely be ASYNC, you will want to
// set the event handler to a global. When you are done, you will issue
// > sendEvent.completed({ allowEvent: true }); // to send
// > sendEvent.completed({ allowEvent: false }); // to block
doSomething.Async(values, asyncComplete);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment