mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 22:56:55 +01:00
Contributed from Curabis's own BCQuality custom layer, rewritten to the community contribution contract (no fenced code in the .md, AL samples as sibling .good.al/.bad.al files, under 100 lines per article).
13 lines
474 B
AL
13 lines
474 B
AL
codeunit 50130 "Contoso Send Confirmation"
|
|
{
|
|
procedure SendOrderConfirmation(FromName: Text; ToAddress: Text; Subject: Text; Body: Text)
|
|
var
|
|
Mail: Codeunit Mail;
|
|
begin
|
|
// Hard-coded to whatever SMTP account is configured; no Sent/Outbox
|
|
// record is left once this call returns.
|
|
Mail.CreateMessage(FromName, ToAddress, '', Subject, Body, true);
|
|
if not Mail.Send() then
|
|
Message(Mail.GetErrorDesc());
|
|
end;
|
|
}
|