Sending Email from Base with multiple attachments

Using Windows 11, 64 bits, 16MB, LO 7.3.5.2 (database Firebird external)

To send an email-message from LibreOffice Base I found a macro to be used.
For this purpose I have installed Thunderbird, since I normally use web-based Email
Everything works very well, including using one attachment, but I would like send multiple files to one or more recipients. I cannot get this to work.
The concerned macro coding is:
Sub SendEmail
Dim eMailer as Object
Dim eMailClient as Object
Dim eMessage as Object
Dim sOnderwerp as String
Dim sBody as String
sFormName = Split(thiscomponent.Title," : ")(1)
oForm = thisComponent.drawpage.forms.getByName(sFormName)
eMailer = createUnoService (“com.sun.star.system.SimpleSystemMail”)
eMailClient = eMailer.querySimpleMailClient()
eMessage = eMailClient.createSimpleMailMessage()
sOnderwerp = oForm.getByName(“F_Onderwerp”).text
sBody = oForm.getByName(“F_Bericht”).text
eMessage.Body = sBody
eMessage.SetRecipient(sEmailAdres)
eMessage.setSubject(sOnderwerp)
eMessage.setAttachement(Array(sFieldName1))
eMailClient.sendSimpleMailMessage(eMessage,
com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE)
End Sub
The Recipient global field sEmailAdres contains the recipient(s), separated by commas
The Attachment global field sFieldname1 contains the filename to attach, converted to URL
Question is: Is it possible to send multiple attachments anyway, and, if yes, how to populate the attachment field to attach multiple files ?

Attachment are written in arrays. Don’t know what “sFiledName1” should do there …

DIM attachs(0)
attachs(0) = "file:///..."
eMessage.setAttachement(attachs())

This is for one attachment.

DIM attachs(1)
attachs(0) = "file:///..."
attachs(1) = "file:///..."
eMessage.setAttachement(attachs())

… and this for two attachments.

You could fill the array in a loop with a counter and ReDim Preserve(counter).

https://help.libreoffice.org/latest/de/text/sbasic/shared/03120312.html?DbPAR=BASIC#bm_id3152801

This is what I thought, but was confused since other examples stated also Array for Recipient, CcRecipient and BccRecipient. Using comma-separated multiple recipient-names works for Recipient, but I have that not tested yet for CcRecipients or BccRecipients…
(I my case the string-variable sFieldName1 contained the URL of the attachment and should be changed to an array, as you indicated)
Many thanks for the quick response!

Thanks for the tip Villeroy, the conversion to URL did already work

I would not be surprised if the mailto protocol turns out to be mandatory as in mailto:john@example.com