Office.DelayDeliveryTime interface
The DelayDeliveryTime object enables you to manage the delayed delivery date and time of a message.
Remarks
[Api set: Mailbox 1.13]
Minimum permission level: read item
Applicable Outlook mode: Compose
Methods
| get |
Gets the delivery date and time of a message. |
| get |
Gets the delivery date and time of a message. |
| set |
Sets the delivery date and time of a message. |
| set |
Sets the delivery date and time of a message. |
Method Details
getAsync(options, callback)
Gets the delivery date and time of a message.
getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<Date | 0>) => void): void;
Parameters
- options
- Office.AsyncContextOptions
An object literal that contains one or more of the following properties:- asyncContext: Developers can provide any object they wish to access in the callback function.
- callback
-
(asyncResult: Office.AsyncResult<Date | 0>) => void
Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an Office.AsyncResult object. The delivery date and time of a message is returned in the asyncResult.value property. If a delivery date hasn't been set on a message yet, 0 is returned instead.
Returns
void
Remarks
[Api set: Mailbox 1.13]
Minimum permission level: read item
Applicable Outlook mode: Compose
getAsync(callback)
Gets the delivery date and time of a message.
getAsync(callback?: (asyncResult: Office.AsyncResult<Date | 0>) => void): void;
Parameters
- callback
-
(asyncResult: Office.AsyncResult<Date | 0>) => void
Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an Office.AsyncResult object. The delivery date and time of a message is returned in the asyncResult.value property. If a delivery date hasn't been set on a message yet, 0 is returned instead.
Returns
void
Remarks
[Api set: Mailbox 1.13]
Minimum permission level: read item
Applicable Outlook mode: Compose
setAsync(datetime, options, callback)
Sets the delivery date and time of a message.
setAsync(datetime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
Parameters
- datetime
-
Date
The future date and time when the message should be sent.
- options
- Office.AsyncContextOptions
An object literal that contains one or more of the following properties:- asyncContext: Developers can provide any object they wish to access in the callback function.
- callback
-
(asyncResult: Office.AsyncResult<void>) => void
Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an Office.AsyncResult object. Any errors encountered will be provided in the asyncResult.error property.
Returns
void
Remarks
[Api set: Mailbox 1.13]
Minimum permission level: read/write item
Applicable Outlook mode: Compose
Important:
When
item.delayDeliveryTime.setAsyncis used to schedule the delivery of a message, the delay is processed on the server. This allows the message to be sent even if the Outlook client isn't running. In classic Outlook on Windows, the message doesn't appear in the Outbox folder, so you won't be able to edit the message or cancel its delivery after selecting Send. You'll only be able to review the message from the Sent Items folder. In Outlook on the web, on Mac, and in new Outlook on Windows, the message appears in the Drafts folder until the scheduled delivery time. While it's in the Drafts folder, you'll be able to edit the message before it's sent. To learn more, see Manage the delivery date and time of a message.The
setAsyncmethod isn't supported on a message that's currently loaded using theloadItemByIdAsyncmethod. For more information, see Activate your Outlook add-in on multiple messages.
Errors:
InvalidFormatError- The format of the specified data object is not valid.
setAsync(datetime, callback)
Sets the delivery date and time of a message.
setAsync(datetime: Date, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
Parameters
- datetime
-
Date
The future date and time when the message should be sent.
- callback
-
(asyncResult: Office.AsyncResult<void>) => void
Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an Office.AsyncResult object. Any errors encountered will be provided in the asyncResult.error property.
Returns
void
Remarks
[Api set: Mailbox 1.13]
Minimum permission level: read/write item
Applicable Outlook mode: Compose
Important:
When
item.delayDeliveryTime.setAsyncis used to schedule the delivery of a message, the delay is processed on the server. This allows the message to be sent even if the Outlook client isn't running. In classic Outlook on Windows, the message doesn't appear in the Outbox folder, so you won't be able to edit the message or cancel its delivery after selecting Send. You'll only be able to review the message from the Sent Items folder. In Outlook on the web, on Mac, and in new Outlook on Windows, the message appears in the Drafts folder until the scheduled delivery time. While it's in the Drafts folder, you'll be able to edit the message before it's sent. To learn more, see Manage the delivery date and time of a message.The
setAsyncmethod isn't supported on a message that's currently loaded using theloadItemByIdAsyncmethod. For more information, see Activate your Outlook add-in on multiple messages.
Errors:
InvalidFormatError- The format of the specified data object is not valid.