Sending multiple pdfs by-email

Hi everyone,

I want to be able to send many pdf invoices by e-mail in the same time (each invoice is related to a different customer).
I know how to do that for a single invoice(generate pdf and then send it by e-mail), but what shall I do if I want to send 3 or for at the same time?

Thanks in advance :)

Do you have any particular requirements that prevents using the code for single sent in a REPEAT…UNTIL loop?

Usually codeunit SMTP mail is used, calling CreateMessage function and AddAttachment as many files has to be attached to the message.