I was trying to create a task that I will be used as a subtask to send an email with attachments. Attachments will vary depending on what the main task is processing. Is it possible to have the email task accept multiple attachments when being called as a subtask?

I have tried creating 2 variable within the email task for attachments that would contain the file location for the purpose of testing. But in a scenario that I only have 1 attachment to send. It was giving me an error that a variable was not defined. Tried putting a character on the second variable (to not make it blank) and a different error would come up that the file cannot be located/missing.