Should change parameters to:
$toEmail string
$template Template