-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Email] Filtering for email retrievals (#2275)
<!-- Thank you for submitting a Pull Request. If you're new to contributing to BCApps please read our pull request guideline below * https://github.com/microsoft/BCApps/Contributing.md --> #### Summary <!-- Provide a general summary of your changes --> - Adds a new codeunit "Email Retrieval Filters" for specifying the filters to be used when retrieving an email. - Update APIs to work with both v2 and v3 interfaces - Obsolete the v2 interface as it's the same just without the filtering. - Update tests #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes [AB#550315](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/550315)
- Loading branch information
Showing
18 changed files
with
718 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/System Application/App/Email/src/Connector/EmailConnectorv3.Interface.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// ------------------------------------------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
// ------------------------------------------------------------------------------------------------ | ||
|
||
namespace System.Email; | ||
|
||
/// <summary> | ||
/// An e-mail connector interface enhances the "Email Connector" with reading, replying to e-mails and marking emails as read. | ||
/// </summary> | ||
interface "Email Connector v3" extends "Email Connector" | ||
{ | ||
/// <summary> | ||
/// Reply to an e-mail using the provided account. | ||
/// </summary> | ||
/// <param name="EmailMessage">The email message that is to be sent out.</param> | ||
/// <param name="AccountId">The email account ID which is used to send out the email.</param> | ||
procedure Reply(var EmailMessage: Codeunit "Email Message"; AccountId: Guid); | ||
|
||
/// <summary> | ||
/// Read e-mails from the provided account. | ||
/// </summary> | ||
/// <param name="AccountId">The email account ID which is used to send out the email.</param> | ||
/// <param name="EmailInbox">The email inbox record that will store the emails.</param> | ||
/// <param name="Filters">Filters to be used when retrieving emails.</param> | ||
procedure RetrieveEmails(AccountId: Guid; var EmailInbox: Record "Email Inbox"; var Filters: Record "Email Retrieval Filters" temporary); | ||
|
||
/// <summary> | ||
/// Mark an e-mail as read in the provided account. | ||
/// </summary> | ||
/// <param name="AccountId">The email account ID.</param> | ||
/// <param name="ExternalId">The external ID of the email.</param> | ||
procedure MarkAsRead(AccountId: Guid; ExternalId: Text); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.