View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006173 | mantisbt | feature | public | 2005-08-23 07:27 | 2005-09-11 08:10 |
Reporter | benles | Assigned To | ryandesign | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | duplicate | ||
Product Version | 1.0.0rc1 | ||||
Summary | 0006173: BCC support for notifications | ||||
Description | I added support for all notifications to be BCC'd to a list of recipients. This works a little better than g_debug_email because it does not prevent emails from being sent normally. Must add to config_inc.php:
| ||||
Tags | No tags attached. | ||||
Attached Files | email_api.php.diff (1,680 bytes)
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 '<br />email_bug_info::Sending email to :'.$t_user_email; + #PRINT '<br />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; | ||||
duplicate of | 0006172 | new | BCC support for notifications |