Skip to content

andriilive/wp-phpmailer-smtp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress PHPMailer SMTP Configuration Plugin

StandWithUkraine  GitHub @andriilive

Configure WP PHPMailer to send mail via SMTP, by defining the SMTP configuration in the wp-config.php file.

  • Requires PHP at least 8.0
  • Tested with WP 5.8.1-6.4.1.
  • Supports Bedrock WordPress installs

Bedrock installation

  1. Edit the .env file
  2. Require the package via composer
# Required SMTP configuration
SMTP_HOST=smtp.xxx.com
SMTP_PORT=465
SMTP_USERNAME=[email protected]
SMTP_PASSWORD=xxxxxxxx

# Optional
SMTP_FROM=[email protected]
SMTP_FROM_NAME=Bot
DISABLE_WP_PHPMAILER_SMTP=true
SMTP_REPLY_TO=[email protected]
composer require andriilive/wp-phpmailer-smtp

Manual installation

  1. Edit the wp-config.php file
  2. Put the wp-phpmailer-smtp.php file in to mu-plugins or plugins dir

wp-config.php

Add SMTP configuration to wp-config.php file

/* Required SMTP configuration */
define('SMTP_HOST', 'smtp.xxx.com');
define('SMTP_PORT', 465);
define('SMTP_USERNAME', '[email protected]');
define('SMTP_PASSWORD', 'xxxxxxxx');

/* Optional */
define('SMTP_FROM', '[email protected]'); // From email
define('SMTP_FROM_NAME', 'Bot'); // From name
define('DISABLE_WP_PHPMAILER_SMTP', true); // Disable WP PHPMailer SMTP
define('SMTP_REPLY_TO', ''); // Adds reply-to header

Download wp-phpmailer-smtp.php

Launch the following command in the mu-plugins or plugins directory

wget https://raw.githubusercontent.com/digitalandy/wp-phpmailer-smtp/main/wp-phpmailer-smtp.php -O wp-phpmailer-smtp.php

About

Configure wordpress PHPMailer to send mail via SMTP.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages