mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
Contributed by CURABIS ApS, generalized from patterns observed across real AppSource/PTE development. Each article follows the knowledge file format (frontmatter, Description/Best Practice/Anti Pattern, sibling .good.al/.bad.al samples).
13 lines
389 B
AL
13 lines
389 B
AL
codeunit 50103 "Order Confirmation Notifier"
|
|
{
|
|
procedure Send(FromName: Text; ToAddress: Text; Subject: Text; Body: Text)
|
|
var
|
|
Mail: Codeunit Mail;
|
|
MailSent: Boolean;
|
|
begin
|
|
Mail.CreateMessage(FromName, ToAddress, '', Subject, Body, true);
|
|
MailSent := Mail.Send();
|
|
if not MailSent then
|
|
Message(Mail.GetErrorDesc());
|
|
end;
|
|
}
|