Emails show how President Trump's team scrambled to overturn election results