我试着按照这里的说明进行操作:https://gist.github.com/butlerblog/7e4dbafcbc61b15505ee8ca90510f1e7
但我感到困惑。我不确定在哪里传递什么参数。以下是我所拥有的:
define( \'SMTP_USER\', \'mylogin@login.ca\' ); // The email address I use when I log in to the wp-admin page
define( \'SMTP_PASS\', \'123password\' ); // The password I use when I log in to the wp-admin page
define( \'SMTP_HOST\', \'localhost\' ); // I am testing this on localhost
define( \'SMTP_FROM\', \'mylogin@login.ca\' ); // Also the email address I use for logging in on the wp-admin page
define( \'SMTP_NAME\', \'My Site Name\' ); // SMTP From name
define( \'SMTP_PORT\', \'25\' ); // SMTP port number - likely to be 25, 465 or 587
define( \'SMTP_SECURE\', \'tls\' ); // Encryption system to use - ssl or tls
define( \'SMTP_AUTH\', true ); // Use SMTP authentication (true|false)
define( \'SMTP_DEBUG\', 1 ); // for debugging purposes only set to 1 or 2
我很确定我没有送上正确的东西。尝试使用wp\\U mail时,调试日志中出现以下错误:[0] => SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
有什么建议吗?非常感谢。