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

H Jacques,

How about this?

That might be a solution, but requires a lot of conditions and will not solve the different file uploads whereas one upload is for .doc,.pdf and the other one for .jpg,.png in different filefields.
I just noticed I haven’t been clear about using two different file fileds in my post before.
I think I have to rethink the whole setup for this.
Thanks for thinking with me.

Ah, well your edit is different. :slight_smile:

Evaluate the size of file for each field:

{{$_POST.file.size > 0}}

Sounds clever. Will go try that.
Thanks