SMTP and delete file error

Hi All,

I would like to send an email with attachment, and then delete the file from the temporary folder.
I am using “SMTP” activity for sending an email, but right after the “SMTP” activity I use the “Delete file” activity that is fails.
The error is that another activity is using the file that is why it can not be deleted. I have already tried the “Delay” between “SMTP” and “Delete” activities but I still get this error.


Do you have any suggestion how to solve it?

try disposing the attachment before deleting the file. Something like this :


Refer this