adding type declaration to toEmail
changing email functions to just use Strings