<commit_before>const keystone				= require( 'keystone' ),
	  utilitiesMiddleware   = require( './utilities' );

exports.sendNewQuestionNotificationEmailToMARE = ( question, staffEmailContact ) => {

	return new Promise( ( resolve, reject ) => {

		const staffEmail = staffEmailContact.staffEmailContact.get( 'email' );
		
		// if sending of the email is not currently allowed
		if( process.env.SEND_QUESTION_RECEIVED_EMAILS_TO_MARE !== 'true' ) {
			// reject the promise with information about why
			return reject( `sending of the email is disabled` );<commit_msg>update have a question email to work with both Keystone wrapped objects as well as POJOs<commit_after>const keystone				= require( 'keystone' ),
	  utilitiesMiddleware   = require( './utilities' );

exports.sendNewQuestionNotificationEmailToMARE = ( question, staffEmailContact ) => {

	return new Promise( ( resolve, reject ) => {

		const staffEmail = staffEmailContact.staffEmailContact.email;
		
		// if sending of the email is not currently allowed
		if( process.env.SEND_QUESTION_RECEIVED_EMAILS_TO_MARE !== 'true' ) {
			// reject the promise with information about why
			return reject( `sending of the email is disabled` );
{'fraction_non_alphanumeric': 0.09515859766277128, 'fraction_numerical': 0.0, 'mean_word_length': 4.400900900900901, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2224505', 'n_tokens_mistral': 372, 'n_tokens_neox': 336, 'n_words': 106}