def send_moderator_action_email(sender_id, recipient_id, intent, exploration_title, email_body):
 require_moderator_email_prereqs_are_satisfied()
 email_config = feconf.VALID_MODERATOR_ACTIONS[intent]
 recipient_user_settings = user_services.get_user_settings(recipient_id)
 sender_user_settings = user_services.get_user_settings(sender_id)
 email_subject = feconf.VALID_MODERATOR_ACTIONS[intent]['email_subject_fn'](exploration_title)
 email_salutation_html = email_config['email_salutation_html_fn'](recipient_user_settings.username)
 email_signoff_html = email_config['email_signoff_html_fn'](sender_user_settings.username)
 full_email_content = ('%s<br><br>%s<br><br>%s<br><br>%s' % (email_salutation_html, email_body, email_signoff_html, EMAIL_FOOTER.value))
 _send_email(recipient_id, sender_id, intent, email_subject, full_email_content, feconf.SYSTEM_EMAIL_ADDRESS, bcc_admin=True)

def send_moderator_action_email ( sender_id , recipient_id , intent , exploration_title , email_body ) : require_moderator_email_prereqs_are_satisfied ( ) email_config = feconf . VALID_MODERATOR_ACTIONS [ intent ] recipient_user_settings = user_services . get_user_settings ( recipient_id ) sender_user_settings = user_services . get_user_settings ( sender_id ) email_subject = feconf . VALID_MODERATOR_ACTIONS [ intent ] [ 'email_subject_fn' ] ( exploration_title ) email_salutation_html = email_config [ 'email_salutation_html_fn' ] ( recipient_user_settings . username ) email_signoff_html = email_config [ 'email_signoff_html_fn' ] ( sender_user_settings . username ) full_email_content = ( '%s<br><br>%s<br><br>%s<br><br>%s' % ( email_salutation_html , email_body , email_signoff_html , EMAIL_FOOTER . value ) ) _send_email ( recipient_id , sender_id , intent , email_subject , full_email_content , feconf . SYSTEM_EMAIL_ADDRESS , bcc_admin = True )
sends a email immediately following a moderator action to the given user .