I recommend using a 3rd party service for sending email. They usually offer SMTP support, and great logging and analytics. Especially on a shared host, where email is locked down, and a "naughty neighbor" can quickly get the server/IP you're emailing from blacklisted.
The services I recommend and use:
To configure email, in your
config.php file, setup the following:
'mail' => [ 'driver' => 'smtp', 'host' => '', 'port' => 587, 'from' => [ 'name' => '', 'address' => '', ], 'username' => '', 'password' => '', ],