Index: config_defaults_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v
retrieving revision 1.130
diff -u -r1.130 config_defaults_inc.php
--- config_defaults_inc.php	1 Sep 2003 14:06:57 -0000	1.130
+++ config_defaults_inc.php	19 Nov 2003 22:10:17 -0000
@@ -186,6 +186,21 @@
 	# Whether user's should receive emails for their own actions
 	$g_email_receive_own	= OFF;
 	
+        # Include bug history in bug info email
+        $g_email_include_history        = ON;
+        
+        # Leave blank for default
+        # use DESC for decending order by timestamp
+        $g_email_bugnote_order  = '';
+        
+        # limit the number of bugnotes in an email
+        # note:  this only makes sense if the
+        # email_bugnote_order is 'DESC' 
+        # otherwise only the first few bugnotes
+        # will be shown instead of the last few
+        # 0 will return all bugnotes
+        $g_email_bugnote_limit  = 0;
+        
 	# set to OFF to disable email check
 	$g_validate_email		= ON;
 	$g_check_mx_record		= ON;
Index: core/email_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/email_api.php,v
retrieving revision 1.63
diff -u -r1.63 email_api.php
--- core/email_api.php	31 Aug 2003 11:32:20 -0000	1.63
+++ core/email_api.php	19 Nov 2003 22:10:18 -0000
@@ -473,7 +473,8 @@
 	function email_build_bugnote_message( $p_bug_id ) {
 		global 	$g_mantis_bugnote_table, $g_mantis_bugnote_text_table,
 				$g_complete_date_format,
-				$g_bugnote_order, $g_email_separator2;
+				$g_email_bugnote_order, $g_email_separator2,
+                                $g_email_bugnote_limit;
 
 		$c_bug_id = (integer)$p_bug_id;
 
@@ -484,7 +485,12 @@
 		$query = "SELECT *, UNIX_TIMESTAMP(last_modified) as last_modified
 				FROM $g_mantis_bugnote_table
 				WHERE bug_id='$c_bug_id' AND view_state='$t_state'
-				ORDER BY date_submitted $g_bugnote_order";
+				ORDER BY date_submitted $g_email_bugnote_order";
+                
+                if ( $g_email_bugnote_limit > 0 ) {
+                        $query .= " LIMIT 0, $g_email_bugnote_limit";
+                }
+                                
 		$result = db_query( $query );
 		$bugnote_count = db_num_rows( $result );
 
@@ -543,7 +549,9 @@
 		$t_message = $p_message."\n";
 		$t_message .= email_build_bug_message( $p_bug_id, $p_message, $t_category );
 		$t_message .= email_build_bugnote_message( $p_bug_id );
-		$t_message .= email_build_history_message( $p_bug_id );
+                if ( ON == config_get( 'email_include_history' ) ) {
+                    $t_message .= email_build_history_message( $p_bug_id );
+                }
 
 		# send mail
 
@@ -603,7 +611,8 @@
 
 			# Support PHPMailer v1.7x
 			if ( method_exists( $mail, 'SetLanguage' ) ) {
-				$mail->SetLanguage( lang_get( 'phpmailer_language' ), $t_phpMailer_path . 'language' . DIRECTORY_SEPARATOR );
+			# JwC - this doesn't seem to work with 1.7x 
+                        #	$mail->SetLanguage( lang_get( 'phpmailer_language' ), $t_phpMailer_path . 'language' . DIRECTORY_SEPARATOR );
 			}
 
 			# Select the method to send mail
