From 8e55a2e71db7a76899cf18c8801aceb30da7574e Mon Sep 17 00:00:00 2001 From: Matti Nielsen Date: Mon, 16 Sep 2024 11:45:42 +0200 Subject: [PATCH] Revert "Reapply "[Email] Add subject to API and docs (#1894)" (#1919) (#2031)" This reverts commit 510712ba2c65443ff5754a2e27711f91922451e3. --- build/Packages.json | 2 +- .../src/Message/EmailMessage.Codeunit.al | 49 +++---------------- .../src/Message/EmailMessageImpl.Codeunit.al | 16 +++--- .../Test/Email/src/EmailTest.Codeunit.al | 6 +-- 4 files changed, 20 insertions(+), 53 deletions(-) diff --git a/build/Packages.json b/build/Packages.json index b125705a10..fc82fd8863 100644 --- a/build/Packages.json +++ b/build/Packages.json @@ -4,7 +4,7 @@ "Source": "NuGet.org" }, "AppBaselines-BCArtifacts": { - "Version": "25.1.24147.0", + "Version": "25.1.23628.0", "Source": "BCArtifacts", "_comment": "Used to fetch app baselines from BC artifacts" } diff --git a/src/System Application/App/Email/src/Message/EmailMessage.Codeunit.al b/src/System Application/App/Email/src/Message/EmailMessage.Codeunit.al index 01c836d4c8..b2f25b65e1 100644 --- a/src/System Application/App/Email/src/Message/EmailMessage.Codeunit.al +++ b/src/System Application/App/Email/src/Message/EmailMessage.Codeunit.al @@ -61,57 +61,24 @@ codeunit 8904 "Email Message" EmailMessageImpl.Create(ToRecipients, Subject, Body, HtmlFormatted, CCRecipients, BCCRecipients); end; - /// - /// Creates the email reply with recipients, subject, and body. - /// - /// The recipient(s) of the email. A string containing the email addresses of the recipients separated by semicolon. - /// The subject of the email. - /// The body of the email. - /// Whether the body is HTML formatted. - /// The external message id to reply to. - procedure CreateReply(ToRecipients: Text; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReply(ToRecipients: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) begin - EmailMessageImpl.CreateReply(ToRecipients, Subject, Body, HtmlFormatted, ExternalId); + EmailMessageImpl.CreateReply(ToRecipients, Body, HtmlFormatted, ExternalId); end; - /// - /// Creates the email reply with recipients, subject, and body. - /// - /// The recipient(s) of the email. A list of email addresses the email will be send directly to. - /// The subject of the email. - /// The body of the email. - /// Whether the body is HTML formatted. - /// The external message id to reply to. - procedure CreateReply(ToRecipients: List of [Text]; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReply(ToRecipients: List of [Text]; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) begin - EmailMessageImpl.CreateReply(ToRecipients, Subject, Body, HtmlFormatted, ExternalId); + EmailMessageImpl.CreateReply(ToRecipients, Body, HtmlFormatted, ExternalId); end; - /// - /// Creates the email reply with recipients, subject, and body. - /// - /// The recipient(s) of the email. A list of email addresses the email will be send directly to. - /// The subject of the email. - /// The body of the email. - /// Whether the body is HTML formatted. - /// The external message id to reply to. - /// The CC recipient(s) of the email. A list of email addresses that will be listed as CC. - /// TThe BCC recipient(s) of the email. A list of email addresses that will be listed as BCC. - procedure CreateReply(ToRecipients: List of [Text]; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text; CCRecipients: List of [Text]; BCCRecipients: List of [Text]) + procedure CreateReply(ToRecipients: List of [Text]; Body: Text; HtmlFormatted: Boolean; ExternalId: Text; CCRecipients: List of [Text]; BCCRecipients: List of [Text]) begin - EmailMessageImpl.CreateReply(ToRecipients, Subject, Body, HtmlFormatted, ExternalId, CCRecipients, BCCRecipients); + EmailMessageImpl.CreateReply(ToRecipients, Body, HtmlFormatted, ExternalId, CCRecipients, BCCRecipients); end; - /// - /// Creates the email replying to all existing recipents on the mail thread, subject, and body. - /// - /// The subject of the email. - /// The body of the email. - /// Whether the body is HTML formatted. - /// The external message id to reply to. - procedure CreateReplyAll(Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReplyAll(Body: Text; HtmlFormatted: Boolean; ExternalId: Text) begin - EmailMessageImpl.CreateReplyAll(Subject, Body, HtmlFormatted, ExternalId); + EmailMessageImpl.CreateReplyAll(Body, HtmlFormatted, ExternalId); end; /// diff --git a/src/System Application/App/Email/src/Message/EmailMessageImpl.Codeunit.al b/src/System Application/App/Email/src/Message/EmailMessageImpl.Codeunit.al index 1ceac8f859..2318eeeff2 100644 --- a/src/System Application/App/Email/src/Message/EmailMessageImpl.Codeunit.al +++ b/src/System Application/App/Email/src/Message/EmailMessageImpl.Codeunit.al @@ -78,32 +78,32 @@ codeunit 8905 "Email Message Impl." UpdateMessage(Recipients, Subject, Body, HtmlFormatted, '', CCRecipients, BCCRecipients); end; - procedure CreateReply(ToRecipients: Text; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReply(ToRecipients: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) var EmptyList: List of [Text]; begin - CreateReply(EmptyList, Subject, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); + CreateReply(EmptyList, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); SetRecipients(Enum::"Email Recipient Type"::"To", ToRecipients); end; - procedure CreateReply(ToRecipients: List of [Text]; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReply(ToRecipients: List of [Text]; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) var EmptyList: List of [Text]; begin - CreateReply(ToRecipients, Subject, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); + CreateReply(ToRecipients, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); end; - procedure CreateReplyAll(Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReplyAll(Body: Text; HtmlFormatted: Boolean; ExternalId: Text) var EmptyList: List of [Text]; begin - CreateReply(EmptyList, Subject, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); + CreateReply(EmptyList, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); end; - procedure CreateReply(ToRecipients: List of [Text]; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text; CCRecipients: List of [Text]; BCCRecipients: List of [Text]) + procedure CreateReply(ToRecipients: List of [Text]; Body: Text; HtmlFormatted: Boolean; ExternalId: Text; CCRecipients: List of [Text]; BCCRecipients: List of [Text]) begin InitializeCreation(); - UpdateMessage(ToRecipients, Subject, Body, HtmlFormatted, ExternalId, CCRecipients, BCCRecipients); + UpdateMessage(ToRecipients, '', Body, HtmlFormatted, ExternalId, CCRecipients, BCCRecipients); end; local procedure InitializeCreation() diff --git a/src/System Application/Test/Email/src/EmailTest.Codeunit.al b/src/System Application/Test/Email/src/EmailTest.Codeunit.al index dc28d58a37..7f247e84f2 100644 --- a/src/System Application/Test/Email/src/EmailTest.Codeunit.al +++ b/src/System Application/Test/Email/src/EmailTest.Codeunit.al @@ -1782,21 +1782,21 @@ codeunit 134685 "Email Test" var Any: Codeunit Any; begin - EmailMessage.CreateReply(Any.Email(), Any.UnicodeText(250), Any.UnicodeText(50), true, Any.UnicodeText(250)); + EmailMessage.CreateReply(Any.Email(), Any.UnicodeText(50), true, Any.UnicodeText(250)); end; local procedure CreateEmailReply(var EmailMessage: Codeunit "Email Message"; Recipients: Text) var Any: Codeunit Any; begin - EmailMessage.CreateReply(Recipients, Any.UnicodeText(250), Any.UnicodeText(50), true, Any.UnicodeText(250)); + EmailMessage.CreateReply(Recipients, Any.UnicodeText(50), true, Any.UnicodeText(250)); end; local procedure CreateEmailReplyAll(var EmailMessage: Codeunit "Email Message") var Any: Codeunit Any; begin - EmailMessage.CreateReplyAll(Any.UnicodeText(250), Any.UnicodeText(50), true, Any.UnicodeText(250)); + EmailMessage.CreateReplyAll(Any.UnicodeText(50), true, Any.UnicodeText(250)); end; [StrMenuHandler]