Compartir a través de


Office.MailboxEnums.SendModeOverride enum

Especifica la opción de modo de envío que invalida la opción establecida en el manifiesto en tiempo de ejecución.

Para obtener información sobre cómo implementar un complemento de alertas inteligentes, vea Controlar eventos OnMessageSend y OnAppointmentSend en el complemento de Outlook con alertas inteligentes.

Comentarios

[ Conjunto de API: Buzón 1.14 ]

Modo de Outlook aplicable: Redacción

Ejemplos

// The following example checks whether a location is specified in an appointment before it's sent.
function onAppointmentSendHandler(event) {
    Office.context.mailbox.item.location.getAsync({ asyncContext: event }, (asyncResult) => {
        const event = asyncResult.asyncContext;
        if (asyncResult.status === Office.AsyncResultStatus.Failed) {
            console.log(asyncResult.error.message);
            // If the add-in is unable to retrieve the appointment's location, the appointment isn't sent.
            event.completed({ allowEvent: false, errorMessage: "Failed to get the appointment's location." });
            return;
        }

        if (asyncResult.value === "") {
            // If no location is specified, the appointment isn't sent and the user is alerted to include a location.
            event.completed(
                {
                    allowEvent: false,
                    cancelLabel: "Add a location",
                    commandId: "msgComposeOpenPaneButton",
                    errorMessage: "Don't forget to add a meeting location.",
                    sendModeOverride: Office.MailboxEnums.SendModeOverride.PromptUser
                }
            );
        } else {
            // If a location is specified, the appointment is sent.
            event.completed({ allowEvent: true });
        }
    });
}

Campos

PromptUser = "promptUser"

Proporciona la opción Enviar de todos modos en un cuadro de diálogo Alertas inteligentes cuando el elemento de correo no cumple las condiciones del complemento basado en eventos. Para obtener más información, consulte la opción del modo de envío de usuario de aviso.