【发布时间】:2022-01-08 01:25:32
【问题描述】:
编辑:已安装 SMTP 插件,它工作正常。
我为我的 WordPress 网站设置了几封自定义电子邮件。其中一个应该向帖子作者发送电子邮件,并将副本发送给网站管理员。没有发送管理员电子邮件。 请有人告诉我可能是什么问题。
谢谢
// Send out email after post expires
$to = $author_email;
$subject = 'Your Listing has expired.';
$message = '<p>Hello ' . $author_display_name . '.</p><p>Please <a title="Your Account" target="_blank" href="'. esc_url( get_permalink( $page_id_dashboard ) ) .'">log into your account here</a> to renew your listing for: <strong>' . get_the_title($post_id) . '</strong>, today!</p>';
$headers = 'Bcc: '.$admin_sitename.' <'.$admin_email.'>';
$mail = wp_mail( $to, $subject, $message, $headers );
wp_update_post($postdata);
【问题讨论】: