File tree 5 files changed +80
-0
lines changed
samples/outlook/99-preview-apis
5 files changed +80
-0
lines changed Original file line number Diff line number Diff line change 793
793
group : Preview APIs
794
794
api_set :
795
795
Mailbox : preview
796
+ - id : outlook-send-async
797
+ name : Send the current message or appointment (Compose)
798
+ fileName : send-async.yaml
799
+ description : Send the current message or appointment.
800
+ rawUrl : >-
801
+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/send-async.yaml
802
+ group : Preview APIs
803
+ api_set :
804
+ Mailbox : preview
796
805
- id : outlook-set-displayed-body-subject
797
806
name : Temporarily set the body or subject displayed in a message (Message Read)
798
807
fileName : set-displayed-body-subject.yaml
Original file line number Diff line number Diff line change 793
793
group : Preview APIs
794
794
api_set :
795
795
Mailbox : preview
796
+ - id : outlook-send-async
797
+ name : Send the current message or appointment (Compose)
798
+ fileName : send-async.yaml
799
+ description : Send the current message or appointment.
800
+ rawUrl : >-
801
+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/99-preview-apis/send-async.yaml
802
+ group : Preview APIs
803
+ api_set :
804
+ Mailbox : preview
796
805
- id : outlook-set-displayed-body-subject
797
806
name : Temporarily set the body or subject displayed in a message (Message Read)
798
807
fileName : set-displayed-body-subject.yaml
Original file line number Diff line number Diff line change
1
+ order : 2
2
+ id : outlook-send-async
3
+ name : Send the current message or appointment (Compose)
4
+ description : Sends the current message or appointment.
5
+ host : OUTLOOK
6
+ api_set :
7
+ Mailbox : preview
8
+ script :
9
+ content : |
10
+ $("#send-async").on("click", sendAsync);
11
+
12
+ function sendAsync() {
13
+ // This snippet sends the current message or appointment being composed.
14
+ Office.context.mailbox.item.sendAsync((asyncResult) => {
15
+ if (asyncResult.status === Office.AsyncResultStatus.Failed) {
16
+ console.log("Action failed with error: " + asyncResult.error.message);
17
+ return;
18
+ }
19
+ });
20
+ }
21
+ language : typescript
22
+ template :
23
+ content : |-
24
+ <section class="ms-Fabric ms-font-m">
25
+ <p class="ms-font-m">This sample shows how to programmatically send the current message or appointment being composed.</p>
26
+ <p><b>Required mode</b>: Compose</p>
27
+ </section>
28
+
29
+ <section class="ms-Fabric samples ms-font-m">
30
+ <h3>Try it out</h3>
31
+ <button id="send-async" class="ms-Button">
32
+ <span class="ms-Button-label">Send</span>
33
+ </button>
34
+ </section>
35
+ language : html
36
+ style :
37
+ content : |-
38
+ section.samples {
39
+ margin-top: 20px;
40
+ }
41
+
42
+ section.samples .ms-Button, section.setup .ms-Button {
43
+ display: block;
44
+ margin-bottom: 5px;
45
+ margin-left: 20px;
46
+ min-width: 80px;
47
+ }
48
+ language : css
49
+ libraries : |-
50
+ https://appsforoffice.microsoft.com/lib/beta/hosted/office.js
51
+ @types/office-js-preview
52
+
53
+ office-ui-fabric-core@11.1.0/dist/css/fabric.min.css
54
+ office-ui-fabric-js@1.5.0/dist/css/fabric.components.min.css
55
+
56
+ core-js@2.4.1/client/core.min.js
57
+ @types/core-js
58
+
59
+ jquery@3.1.1
60
+ @types/jquery@3.3.1
Original file line number Diff line number Diff line change 83
83
"outlook-get-item-class-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-class-async.yaml" ,
84
84
"outlook-other-item-apis-item-id-compose" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/item-id-compose.yaml" ,
85
85
"outlook-get-set-isalldayevent" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/get-set-isalldayevent.yaml" ,
86
+ "outlook-send-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/send-async.yaml" ,
86
87
"outlook-set-displayed-body-subject" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/set-displayed-body-subject.yaml"
87
88
}
Original file line number Diff line number Diff line change 83
83
"outlook-get-item-class-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/90-other-item-apis/get-item-class-async.yaml" ,
84
84
"outlook-other-item-apis-item-id-compose" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/90-other-item-apis/item-id-compose.yaml" ,
85
85
"outlook-get-set-isalldayevent" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/99-preview-apis/get-set-isalldayevent.yaml" ,
86
+ "outlook-send-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/99-preview-apis/send-async.yaml" ,
86
87
"outlook-set-displayed-body-subject" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/99-preview-apis/set-displayed-body-subject.yaml"
87
88
}
You can’t perform that action at this time.
0 commit comments