Move success email delivery and fix filename display