I have an issue not every time I send email I want to attach the pdf but Its required to have attachment how can I bypass it to send email without attach
I am trying to use attachPDFSwitch.value
to set a null
value when I don't want to attaching a PDF. However, it isn't working as expected. When the value is set to null
, I'm encountering an error, as shown in the attached photo.
To resolve the issue of attaching a PDF, I added an empty array when PDF attachment isn't needed. This solution should be helpful for anyone encountering the same problem.
2 Likes