ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Event request codeunit 5064 "Email Logging Dispatcher"

Open JonFjolnirAlbertsson opened this issue 5 years ago • 2 comments

In the function "local procedure IsMessageToLog... " we need the option to change the value of the variable Sender and to handle the function. ...

local procedure IsMessageToLog(QueueMessage: DotNet IEmailMessage; var SegLine: Record "Segment Line"; var Attachment: Record Attachment): Boolean
    var
        Sender: DotNet IEmailAddress;
    begin

        IsHandled := false;
        OnBeforeIsMessageToLog(SegLine, IsHandled);
        if IsHandled then
            exit;

        if QueueMessage.IsSensitive then begin
            Session.LogMessage('0000BWA', MessageNotForLoggingTxt, Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, 'Category', EmailLoggingTelemetryCategoryTxt);
            exit(false);
        end;

        Sender := QueueMessage.SenderAddress; 
        OnAfterGetSenderAddress(Sender);

OnAfterGetSenderAddress(Var Sender: Text)

JonFjolnirAlbertsson avatar May 07 '21 14:05 JonFjolnirAlbertsson

We will implement OnBeforeIsMessageToLog, but the part with modifying Sender var - we can't expose dotnet variables in events, so that won't be done.

Stepanenko-Vadim avatar May 13 '21 09:05 Stepanenko-Vadim

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

JesperSchulz avatar May 14 '21 15:05 JesperSchulz