Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
Hi Everyone, hope you are having a great day. I am facing an issue with sending email through email, I have developed a functionality using SMTP that generate the PDF of a Posted Sales Invoice, and the PDF in attachment and sent it to a particular customer, The functionality work as expected if I try to send one invoice, but whenever I select more then one invoice, it sends few of them and show error dialog (attached)
SendInvoice(SalesHeaders : Record "Sales Invoice Header") : Boolean
IF customer.GET(SalesHeaders."Sell-to Customer No." )THEN
WITH TempEmailItem DO BEGIN
"Send to" := customer."E-Mail";
Subject := CompanyInfo.Name+' - Invoice ' + SalesHeaders."No.";
Body := EmailBody.Blob;
"Attachment File Path":= GeneratedPath;
"Attachment Name" := 'Sales Invoice '+SalesHeader."No."+'.pdf';
"Plaintext Formatted" := FALSE;
LOCAL GenerateEmailBody(SalesHeader : Record "Sales Invoice Header";VAR BodyBlob : Record TempBlob)
GeneratedPath := GenerateEmailAttachment(SalesHeader."No.");
IF customer.GET(SalesHeader."Sell-to Customer No." )THEN
BodyStream.WRITETEXT(Text1+' '+ customer.Name +'<br><br>' );
BodyStream.WRITETEXT(Text2+' ' + SalesHeader."No." +'<br><br>' );
BodyStream.WRITETEXT('<IMG src="'+FileName+'" width="175" height="53">');
LOCAL GenerateEmailAttachment(SaleHeaderNo : Code) : Text
FilePath := COPYSTR(FileManagement.ServerTempFileName('pdf'),1,250);
I have debugged the session as well, but was not able to find the solution. Please suggest what to do.
Hello Abdullah- We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.
I will open this up to the community in case they have something to add.
You should check your connectivity as you mentioned this happened when you selected multiple.
Also make sure you have called Security Protocol/tls1.2 before send as shown below screenshot.
Business Applications communities