The best way to send email through WordPress is with an external SMTP server. This is because (dedicated) SMTP servers are usually better setup to avoid spam, using SPF, blacklists, port blocking and more.
With an external SMTP server your emails are less likely to end up in your users spamfilter.
The first thing you need is a standalone SMTP server that is correctly configured. Then you need to setup SPF for your domain name to this SMTP server. Finally you need to setup WordPress with an external SMTP server.
We recommend using the WordPress plugin WP Mail SMTP. After installing/activating WP Mail SMTP, visit the settings page for the plugin. Here you can set which email address to send from, mailer to use and so on.
Most users would probably pick “Other SMTP”, unless their provider is listed.
Further down you have to set the settings for the SMTP server. Here recommend to set it to SSL or TLS if your SMTP provider supports it.
These are all settings that you’ll get from your SMTP provider.
When everything is set up, do an email test to an address of your choice.
And again, don’t forget to setup an SPF record to the SMTP server for your domain name.