File deletion problem fixed
I've sorted my problem. I used a session variable to store the name of the file I was uploading and then placed the delete file server behaviour on the page that appeared after the email had been sent. Everything seems to be working fine now.