How to add additional files dynamically with smtp as destination
Q: I would need to send more than one selected file as attachments to a single mail-recipient. I haven’t managed to get it to work though. LimagitoX always send one mail per attachment. Are multiple attachments possible? It would be of considerable benefit to us, to be able to send multiple attachments. Would it be possible to add the discussed feature? We could be willing to contribute financially if that would persuade you.
A: In version v2025.9.17.0 we added an option to add additional file(s) to SMTP as Destination. It is not exactly what you are asking but it could be used to achieve the same result.
The following example will email all pdf files from a Source folder and when emailed successfully they will be deleted afterwards.
- We used a Windows folder as Source:
- Click <Schedule> > Advanced Tab > Set Max. Files processed in One Scan to 1
- We just need one file from the source folder as a trigger to send the email
- Function Setup
- Although the function is set to ‘Copy Files’ we’ll delete the source files using our Pascal Script option when the email was sent successfully
- Select ‘Destination Memory & Exit Cyclus on Error’
- This means that when the Second Destination fails (sending the email), then the third Destination will not be executed (deleting the Source files)
- Destination Setup:
- First Destination: Pascal Script
- Second Destination: SMTP
- Third Destination: Pascal Script
- First Destination: Pascal Script
- Script available here: link
- This Pascal Script will search for all pdf files from the Windows as Source folder
- These files are added to a Pascal Script String Var: %VSA
- First Destination: Pascal Script
- Second Destination: SMTP
- Add the variable %VSA to the Additional field
- Variable %VSA contains all pdf files found in the Windows Source folder
- Disable ‘Include Source File as Attachment’ because this file is already included in the Additional %VSA variable
- Add the variable %VSA to the Additional field
- Third Destination: Pascal Script
- Script available here: link
- This Pascal Script will delete all pdf files from the Windows as Source folder when the email was sent successfully.
- Third Destination: Pascal Script
- RunTime Log Result:
If you need any help about this ‘additional files dynamically with smtp’ option, please let us know.
Best Regards,
Limagito Team
#smtp #managedfiletransfer #filetransfer #filemanagement