wordpress PHPMailer config

  1. Open the wp-config.php file in your WordPress installation.
  2. Add the following lines of code to specify the SMTP settings for PHPMailer:
define( 'PHPMAILER_HOST', 'mail.example.com' );
define( 'PHPMAILER_PORT', 587 );
define( 'PHPMAILER_USER', 'username' );
define( 'PHPMAILER_PASS', 'password' );
define( 'PHPMAILER_SECURE', 'tls' );
  1. Replace 'mail.example.com' with the SMTP host of your email provider.
  2. Replace '587' with the appropriate port number for your email provider.
  3. Replace 'username' with your email account username.
  4. Replace 'password' with your email account password.
  5. Set 'tls' or 'ssl' based on the security protocol supported by your email provider.
  6. Save the wp-config.php file and test your email functionality.