Condition Email with or without attachment

Hi, buddys!

I’m going through the same problem … I can not send the url of the attachment to the email.

It always shows that the file was not attached.

I used the idea of ​​Mohamed, but it did not work.

I noticed that it calls two types of files for the sendEmail and sendEmailWithSender pages.

Follow the print of my code so that you can help me in some way if possible.