Finished sendemail function. No need to tinker.