--- C:/Work/related/mantis/mantis-1.0.8/core/email_api.php Tue Mar 06 09:54:14 2007 +++ C:/Work/related/mantis/bugz/core/email_api.php Wed Feb 13 18:10:34 2008 @@ -22,6 +22,9 @@ # reusable object of class SMTP $g_phpMailer_smtp = null; + # (amdei) + $g_modifier_account_name = ""; + ########################################################################### # Email API ########################################################################### @@ -614,6 +617,8 @@ # this is ok for now as nothing uses it function email_send( $p_recipient, $p_subject, $p_message, $p_header='', $p_category='', $p_exit_on_error=true ) { global $g_phpMailer_smtp; + # (amdei) + global $g_modifier_account_name; $t_recipient = trim( $p_recipient ); $t_subject = string_email( trim( $p_subject ) ); @@ -735,6 +740,9 @@ $mail->AddCustomHeader( "Keywords: $p_category" ); } + # (amdei) + $mail->AddCustomHeader( "MNBT_ModifiedBy: $g_modifier_account_name" ); + if ( !$mail->Send() ) { PRINT "PROBLEMS SENDING MAIL TO: $p_recipient
"; PRINT 'Mailer Error: '.$mail->ErrorInfo.'
'; @@ -890,6 +898,9 @@ # Build the bug info part of the message function email_format_bug_message( $p_visible_bug_data ) { + # (amdei) + global $g_modifier_account_name; + $t_normal_date_format = config_get( 'normal_date_format' ); $t_complete_date_format = config_get( 'complete_date_format' ); @@ -1005,6 +1016,7 @@ str_pad( $t_raw_history_item['username'], 15 ) . str_pad( $t_localized_item['note'], 25 ) . str_pad( $t_localized_item['change'], 20 ) . "\n"; + $g_modifier_account_name = $t_raw_history_item['username']; } $t_message .= $t_email_separator1 . " \n\n"; }