Hi Experts,
i want to attach multiple file(multiple reports) in smtp mail please tell me any solution,
this my code
PdfDocPath :='ABC.pdf';
PdfDocPath1 := 'Customer ledger Report.pdf';
Path := 'C:\\Temp'+PdfDocPath+PdfDocPath1 // Directory + Path
CLEAR(ABC);// ABC is a Report 50088
CLEAR(Customer ledger Report)
ABC.USEREQUESTPAGE(FALSE); //// for filteration
Customer ledger Report.USEREQUESTPAGE(FALSE); //// for filteration
IF NOT ABC.SAVEASPDF(Path) THEN
IF NOT Customer ledger Report.SAVEASPDF(Path) THEN
ERROR('PDF Creating Failed!\\ERROR:\\' + GETLASTERRORTEXT);
SMTP.CreateMessage('Jonas Wood','arunkumar.A@gmail .com','','outstanding amount');
SMTP.AppendBody('Dear Sir / Madam,');
SMTP.AppendBody('<br><br>');
SMTP.AppendBody('Please find the Customer Ledger report in PDF Format:');
SMTP.AppendBody('<br><br>');
SMTP.AppendBody('Regards');
SMTP.AppendBody('<br>');
SMTP.AppendBody('Company Accounts Departments ');
SMTP.AddAttachment(Path,PdfDocPath,PdfDocPath1 );
SMTP.Send;
//ERASE(Path);
Thank you
*This post is locked for comments
Dear Arun Ji,
You can get idea from my posted thread.
community.dynamics.com/.../658673
Hope it will help you.
Just call SMTP.AddAttachment for every file you want to attach to your message.
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