How to upload multiple file fields and include links to each in an email

I have a form that has 3 separate file uploads that are optional.
In my server connect I check to see if there is a file to be uploaded and upload it if it is there.
I do this for each file upload and I can see they are all uploaded in the file system
For some reason the email is sent after the first file is uploaded and the link only to that file is in the email.
If the first upload is empty, the second file link will be in the email but not the third.
How do I stop the mail send until all files have been uploaded?
I set a link to the uploaded file as this allows the files to be larger than the email will allow and preserves the file information eg. a jpg of a document.
Even when I tried attaching the files it would only attach the first one and send the email.
There is no file processing - just upload and rename using {guid}{ext} and as said earlier, they are all uploaded and in the file system.

Disregard - I used the inspector and found all the files were being uploaded as an array which explains it.
Working as it should now.