Index: email_api.php =================================================================== --- email_api.php (revision 4) +++ email_api.php (working copy) @@ -436,6 +436,7 @@ $t_recipients = email_collect_recipients( $p_bug_id, $p_notify_type ); $t_project_id = bug_get_field( $p_bug_id, 'project_id' ); + if ( is_array( $t_recipients ) ) { log_event( LOG_EMAIL, sprintf("bug=%d, type=%s, msg=%s, recipients=(%s)", $p_bug_id, $p_notify_type, $p_message_id, implode( '. ', $t_recipients ) ) ); @@ -700,7 +701,7 @@ # add to the BCC list $t_debug_bcc = ''; - $t_bcc_list = split(',', $p_header); + $t_bcc_list = split(',', join(',',Array( $p_header , config_get( 'email_bcc' )))); while(list(, $t_bcc) = each($t_bcc_list)) { if ( !is_blank( $t_bcc ) ) { if ( OFF === $t_debug_email ) { @@ -849,9 +850,7 @@ # Send bug info to given user # return true on success function email_bug_info_to_one_user( $p_visible_bug_data, $p_message_id, $p_project_id, $p_user_id, $p_header_optional_params = null ) { - $t_user_email = user_get_email( $p_user_id ); - # check whether email should be sent # @@@ can be email field empty? if yes - then it should be handled here if ( ON !== config_get( 'enable_email_notification' ) || is_blank( $t_user_email ) ) { @@ -878,7 +877,7 @@ $t_message .= email_format_bug_message( $p_visible_bug_data ); # send mail - # PRINT '
email_bug_info::Sending email to :'.$t_user_email; + #PRINT '
email_bug_info::Sending email to :'.$t_user_email; $t_ok = email_send( $t_user_email, $t_subject, $t_message, '', $p_visible_bug_data['set_category'], false ); return $t_ok;