To mail uploaded file or not

I have a form with a possibility to upload two different files in seperate file fields. However these are not required.
Now, when I upload both files (select files to upload in the form) those files will be mailed as attachments.
But I would also like to mail the contents of the form when only one or no files have been uploaded.
Can anyone give me directions on how to achieve this?
Condition {{$_POST.file}} will not work

Community Page
Last updated: