Sometimes, after a fresh WordPress install, you cannot send mail from your website.
Setting up the internal Wordpress function
In order for mail to work, you need to set up the correct settings for the outgoing mail.
- /wp-includes/pluggable.php in wp_mail() function.
- /wp-includes/class-phpmailer.php in send() function.
If the settings are correct, but the mail still does not work, you need to enable the wp-phpmailer plugin and check its setting Use the internal WP function.
Setting up the MAIL FROM plugin
If you do not want to edit the configuration files by hand, you can use the MAIL FROM plugin.
- Install the plugin.
- Go to the WordPress Dashboard.
- Hover the mouse over Settings.
- Click MAIL FROM.
- Setup the sender name and e-mail address.