Index: scripts/checkin.php
===================================================================
--- scripts/checkin.php	(revision 5076)
+++ scripts/checkin.php	(working copy)
@@ -92,11 +92,19 @@
 	foreach ( $t_issues as $t_issue_id ) {
 		if ( !in_array( $t_issue_id, $t_fixed_issues ) ) {
 			helper_call_custom_function( 'checkin', array( $t_issue_id, $t_comment, $t_history_old_value, $t_history_new_value, false ) );
+			if ( !is_blank( $t_comment ) ) {
+				email_bugnote_add( $t_issue_id );
+			}
 		}
 	}
 
 	foreach ( $t_fixed_issues as $t_issue_id ) {
 		helper_call_custom_function( 'checkin', array( $t_issue_id, $t_comment, $t_history_old_value, $t_history_new_value, true ) );
+		if ( $g_source_control_set_status_to == 'CLOSED' ) {
+			email_close( $t_issue_id );
+		} else {
+			email_resolved( $t_issue_id );
+		}
 	}
 
 	exit( 0 );
