In the openWith code we extract the file to a QTemporaryDir and set autoDelete to false. This means that on Windows where tmp is not cleaned up on reboot this will add up with a lot of files.
My suggestion would be to save the temporary folders where we opened the files with in a list in the mailviewer and then delete them when the mailviewer is closed. Due to Windows "You cannot delete an open file" mechanic there should be no data loss, but at least we would be innocent if the files then stick around.