WP Mail SMTP与多站点兼容这是一个很好的隐藏功能-您需要检查插件的源代码并向wp-config.php
. 如果通过每个站点的“管理”面板配置WP Mail SMTP,则它将仅适用于已配置的站点,而不适用于网络管理
如何为wordpress multisite(WPMU)设置SMTP电子邮件
Check the code
/**
* Setting options in wp-config.php
*
* Specifically aimed at WPMU users, you can set the options for this plugin as
* constants in wp-config.php. This disables the plugin\'s admin page and may
* improve performance very slightly. Copy the code below into wp-config.php.
*/
define(\'WPMS_ON\', true);
define(\'WPMS_MAIL_FROM\', \'From 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\', \'localhost\'); // The SMTP mail host
define(\'WPMS_SMTP_PORT\', 25); // The SMTP server port number
define(\'WPMS_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\', \'username\'); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true
define(\'WPMS_SMTP_PASS\', \'password\'); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true