Hi everyone I have implemented some mail sending functionality to send(Posted Sales Invoices) with custom email body, when I try to send multiple it send few of them and show message that enable to send email, If I try to debug it show them following error.
Please suggest a solution design change or code imporvement thanks
CLEARALL(); SMTPSetup.GET; IF customer.GET(SalesHeaders."Sell-to Customer No." )THEN customer.TESTFIELD("E-Mail"); CompanyInfo.GET(); WITH TempEmailItem DO BEGIN "From Address" := SMTPSetup."User ID"; "Send to" := customer."E-Mail"; Subject := CompanyInfo.Name ' - Invoice ' SalesHeaders."No."; GenerateEmailBody(SalesHeaders, EmailBody); Body := EmailBody.Blob; "Attachment File Path":= GenerateEmailAttachment(SalesHeader."No.");; "Attachment Name" := 'Sales Invoice ' SalesHeader."No." '.pdf'; "Plaintext Formatted" := FALSE; EXIT(Send(TRUE)); END;
Hi Abdullah Zafar,
Can you send a print of the function "TrySend" of codeunit "400" please
Thank you Marco Mels , The issue was due to the TLS version, to resolve I had added dotnet variable in function TrySend of codeunit 400. I have followed this guide from Erik Hougaard
Best Regards
Hello,
Usually this error related to Tls1.2 requirements that are not met. The forum has a few suggestions that you can follow up on, using registry. Tls1.2 was only added in Dynamics NAV xxx in a specific cumulative update.
Thanks.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156