Clean up attachments regardless of success or failure.