I get this error 'The process cannot access the file because it is being used by another process.' when right after I send email with file attachment. What I am doing is send an email with file attachment and then i click a button to delete the same file from server.
I did some research and found that the asp.net process basically locks the file so cant delete it. How do I unlock the file? The email code I thought would release the file once the file is sent but it still holds the reference to the file I guess. Also doesnt send method, close the mail object?
...
Go to the complete details ...