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 b2f25b65e1..01c836d4c8 100644 --- a/src/System Application/App/Email/src/Message/EmailMessage.Codeunit.al +++ b/src/System Application/App/Email/src/Message/EmailMessage.Codeunit.al @@ -61,24 +61,57 @@ codeunit 8904 "Email Message" EmailMessageImpl.Create(ToRecipients, Subject, Body, HtmlFormatted, CCRecipients, BCCRecipients); end; - procedure CreateReply(ToRecipients: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + /// + /// 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) begin - EmailMessageImpl.CreateReply(ToRecipients, Body, HtmlFormatted, ExternalId); + EmailMessageImpl.CreateReply(ToRecipients, Subject, Body, HtmlFormatted, ExternalId); end; - procedure CreateReply(ToRecipients: List of [Text]; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + /// + /// 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) begin - EmailMessageImpl.CreateReply(ToRecipients, Body, HtmlFormatted, ExternalId); + EmailMessageImpl.CreateReply(ToRecipients, Subject, Body, HtmlFormatted, ExternalId); end; - procedure CreateReply(ToRecipients: List of [Text]; Body: Text; HtmlFormatted: Boolean; ExternalId: Text; CCRecipients: List of [Text]; BCCRecipients: List of [Text]) + /// + /// 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]) begin - EmailMessageImpl.CreateReply(ToRecipients, Body, HtmlFormatted, ExternalId, CCRecipients, BCCRecipients); + EmailMessageImpl.CreateReply(ToRecipients, Subject, Body, HtmlFormatted, ExternalId, CCRecipients, BCCRecipients); end; - procedure CreateReplyAll(Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + /// + /// 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) begin - EmailMessageImpl.CreateReplyAll(Body, HtmlFormatted, ExternalId); + EmailMessageImpl.CreateReplyAll(Subject, 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 2318eeeff2..1ceac8f859 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; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReply(ToRecipients: Text; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) var EmptyList: List of [Text]; begin - CreateReply(EmptyList, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); + CreateReply(EmptyList, Subject, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); SetRecipients(Enum::"Email Recipient Type"::"To", ToRecipients); end; - procedure CreateReply(ToRecipients: List of [Text]; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReply(ToRecipients: List of [Text]; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) var EmptyList: List of [Text]; begin - CreateReply(ToRecipients, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); + CreateReply(ToRecipients, Subject, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); end; - procedure CreateReplyAll(Body: Text; HtmlFormatted: Boolean; ExternalId: Text) + procedure CreateReplyAll(Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text) var EmptyList: List of [Text]; begin - CreateReply(EmptyList, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); + CreateReply(EmptyList, Subject, Body, HtmlFormatted, ExternalId, EmptyList, EmptyList); end; - procedure CreateReply(ToRecipients: List of [Text]; Body: Text; HtmlFormatted: Boolean; ExternalId: Text; CCRecipients: List of [Text]; BCCRecipients: List of [Text]) + procedure CreateReply(ToRecipients: List of [Text]; Subject: Text; Body: Text; HtmlFormatted: Boolean; ExternalId: Text; CCRecipients: List of [Text]; BCCRecipients: List of [Text]) begin InitializeCreation(); - UpdateMessage(ToRecipients, '', Body, HtmlFormatted, ExternalId, CCRecipients, BCCRecipients); + UpdateMessage(ToRecipients, Subject, 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 7f247e84f2..dc28d58a37 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(50), true, Any.UnicodeText(250)); + EmailMessage.CreateReply(Any.Email(), Any.UnicodeText(250), 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(50), true, Any.UnicodeText(250)); + EmailMessage.CreateReply(Recipients, Any.UnicodeText(250), 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(50), true, Any.UnicodeText(250)); + EmailMessage.CreateReplyAll(Any.UnicodeText(250), Any.UnicodeText(50), true, Any.UnicodeText(250)); end; [StrMenuHandler]