我正在发送一封来自php的电子邮件,但没有发送任何内容,这一次都有效,现在又停止了工作:
function email_last_scan() {
global $wpdb;
$wpdb->query('UPDATE hap_stats SET emailed_reports = emailed_reports + 1');
$user = wp_get_current_user();
$headers = array('Content-Type: text/html; charset=UTF-8');
$filtered_data = preg_replace('/<a href=\"(.*?)\">(.*?)<\/a>/', "\\2", $_SESSION['ob_data']);
if (isset($_SESSION['ob_data']) and $user = get_userdata($user->id))
wp_mail($user->user_email, 'Scan Results', $filtered_data, $headers);
}