我在我的子主题(child-theme-functions.php)中使用了以下代码:
add_action( \'phpmailer_init\', \'wpse8170_phpmailer_init\',0 );
function wpse8170_phpmailer_init( PHPMailer $phpmailer ) {
$phpmailer->Host = \'your.smtp.server.here\';
$phpmailer->Port = 25; // could be different
$phpmailer->Username = \'[email protected]\'; // if required
$phpmailer->Password = \'yourpassword\'; // if required
$phpmailer->SMTPAuth = true; // if required
$phpmailer->SMTPSecure = \'ssl\'; // enable if required, \'tls\' is another possible value
$phpmailer->IsSMTP();
}
但它不发送SMTP邮件。我用SMTP程序(如wp mail SMTP)检查了SMTP凭据,它们成功地发送了测试电子邮件,但当我使用联系人表单7插件时,它不再发送邮件。我的主人是科帕内尔/戈达迪
有人能帮我吗?