Setting up gmail on WordPress multisite is a little bit different that the single site. The single site can be easily set using the available plugin.
For this setting, we will use WP Mail Plugin. You can download it here https://wordpress.org/plugins/wp-mail-smtp/ or install it directly from your wordpress.
After installed, add the following code to your wp-config.php
define(‘WPMS_ON’, true);
define(‘WPMS_MAIL_FROM’, ‘<your email>’);
define(‘WPMS_MAIL_FROM_NAME’, ‘<from name>’);
define(‘WPMS_MAILER’, ‘smtp’); // Possible values ‘smtp’, ‘mail’, or ‘sendmail’
define(‘WPMS_SET_RETURN_PATH’, ‘false’); // Sets $phpmailer->Sender if true
define(‘WPMS_SMTP_HOST’, ‘smtp.gmail.com’); // The SMTP mail host
define(‘WPMS_SMTP_PORT’, 465); // The SMTP server port number
define(‘WPMS_SSL’, ‘ssl’); // Possible values ”, ‘ssl’, ‘tls’ – note TLS is not STARTTLS
define(‘WPMS_SMTP_AUTH’, true); // True turns on SMTP authentication, false turns it off
define(‘WPMS_SMTP_USER’, ‘<your email>’); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true
define(‘WPMS_SMTP_PASS’, ‘<email password>’); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true
Then Activate Network for the WP Mail Plugin.
Test it by adding your user site. There should be an email trigger to user and admin.
Leave a Reply