-
Notifications
You must be signed in to change notification settings - Fork 125
/
Copy pathsend-async.yaml
60 lines (54 loc) · 1.81 KB
/
send-async.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
order: 2
id: outlook-send-async
name: Send the current message or appointment (Compose)
description: Sends the current message or appointment.
host: OUTLOOK
api_set:
Mailbox: preview
script:
content: |
$("#send-async").on("click", sendAsync);
function sendAsync() {
// This snippet sends the current message or appointment being composed.
Office.context.mailbox.item.sendAsync((asyncResult) => {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
console.log("Action failed with error: " + asyncResult.error.message);
return;
}
});
}
language: typescript
template:
content: |-
<section class="ms-Fabric ms-font-m">
<p class="ms-font-m">This sample shows how to programmatically send the current message or appointment being composed.</p>
<p><b>Required mode</b>: Compose</p>
</section>
<section class="ms-Fabric samples ms-font-m">
<h3>Try it out</h3>
<button id="send-async" class="ms-Button">
<span class="ms-Button-label">Send</span>
</button>
</section>
language: html
style:
content: |-
section.samples {
margin-top: 20px;
}
section.samples .ms-Button, section.setup .ms-Button {
display: block;
margin-bottom: 5px;
margin-left: 20px;
min-width: 80px;
}
language: css
libraries: |-
https://appsforoffice.microsoft.com/lib/beta/hosted/office.js
@types/office-js-preview
[email protected]/dist/css/fabric.min.css
[email protected]/dist/css/fabric.components.min.css
[email protected]/client/core.min.js
@types/core-js
@types/[email protected]