Method One: Modify the code
Step 1: rewrite wp-includes/pluggable.php to change the default WordPress mail settings to SMTP mode.
// Set to use PHP ' s mail ()//$phpmailer->ismail (); $phpmailer->issmtp ();
Step 2: rewrite wp-includes/class-phpmailer.php, modify class Phpmailer, set $From according to your needs , $ Host, $ Smtpauth, $ smtpsecure, and so on. The advantage is more freedom, can set the option more and more fine.
Method two: Using Plug-ins
After several SMTP plugins have been swapped, the final decision is to use WP SMTP. Because I bring my own Chinese translation. The advantage is convenient to modify the settings at any time. ()
However, either way, you need to pre-open the SMTP service in your own SMTP mailbox, and remember the SMTP server address, port, SSL is generally 465.
Take 163 mailbox As an example, such as QQ mailbox similar:
Problem solving: WordPress on SAE registration mail cannot be sent