total ) {
$total += $log->total;
}
if ( $log->sent ) {
$sent += $log->sent;
}
if ( $log->failed ) {
$failed += $log->failed;
}
if ( $is_addonactivated && property_exists( $log, 'opened' ) ) {
$opened += $log->opened;
}
}
}
/**
* Filters the email address to which the report is sent.
*
* @param string $to The email address to which the report is sent.
* @since 2.9.0
* @version 1.0.0
*/
$admin_email = apply_filters( 'postman_rat_reporting_email_to', get_option( 'admin_email' ) );
$admin_name = '';
$user = get_user_by( 'email', $admin_email );
if ( $user ) {
$admin_name = ! empty( $user->first_name ) ? $user->first_name : $user->user_login;
}
/**
* Filters the site title to be used in the email subject.
*
* @param string $site_title The site title.
* @since 2.9.0
* @version 1.0.0
*/
$site_title = apply_filters( 'postman_rat_reporting_email_site_title', get_bloginfo( 'name' ) );
$url = admin_url( "admin.php?page=post-smtp-email-reporting&from={$from}&to={$to}" );
$extension_url = 'https://postmansmtp.com/pricing/?utm_source=wordpress&utm_medium=email&utm_campaign=email_report&utm_content=report_and_tracking';
$disable_url = 'https://postmansmtp.com/pricing/?utm_source=wordpress&utm_medium=email&utm_campaign=email_report&utm_content=email_health_report/';
$body = '