View Issue Details

IDProjectCategoryView StatusLast Update
0006172mantisbtemailpublic2017-12-05 07:18
ReporterbenlesAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version1.0.0rc1 
Target VersionFixed in Version 
Summary0006172: 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:

$g_email_bcc            = "email@email.com";
Tagspatch

Relationships

has duplicate 0006173 closedryandesign BCC support for notifications 

Activities

2005-08-23 07:26

 

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;
email_api.php.diff (1,680 bytes)

Issue History

Date Modified Username Field Change
2005-08-23 07:26 benles New Issue
2005-08-23 07:26 benles File Added: email_api.php.diff
2005-08-23 12:46 ryandesign Relationship added has duplicate 0006173
2014-10-05 06:29 grangeway Tag Attached: patch
2014-11-25 11:17 vboctor Category feature => email