def send_feedback_message_email(recipient_id, feedback_messages):
 email_subject = ("You've received %s new message%s on your explorations" % (len(feedback_messages), ('s' if (len(feedback_messages) > 1) else '')))
 email_body_template = 'Hi %s,<br><br>You\'ve received %s new message%s on your Oppia explorations:<br><ul>%s</ul>You can view and reply to your messages from your <a href="https://www.oppia.org/dashboard">dashboard</a>.<br>Thanks, and happy teaching!<br><br>Best wishes,<br>The Oppia Team<br><br>%s'
 if (not feconf.CAN_SEND_EMAILS):
  log_new_error('This app cannot send emails to users.')
  return
 if (not feconf.CAN_SEND_FEEDBACK_MESSAGE_EMAILS):
  log_new_error('This app cannot send feedback message emails to users.')
  return
 if (not feedback_messages):
  return
 recipient_user_settings = user_services.get_user_settings(recipient_id)
 messages_html = ''
 for (_, reference) in feedback_messages.iteritems():
  for message in reference['messages']:
   messages_html += ('<li>%s: %s<br></li>' % (reference['title'], message))
 email_body = (email_body_template % (recipient_user_settings.username, len(feedback_messages), ('s' if (len(feedback_messages) > 1) else ''), messages_html, EMAIL_FOOTER.value))
 _send_email(recipient_id, feconf.SYSTEM_COMMITTER_ID, feconf.EMAIL_INTENT_FEEDBACK_MESSAGE_NOTIFICATION, email_subject, email_body, feconf.NOREPLY_EMAIL_ADDRESS)

def send_feedback_message_email ( recipient_id , feedback_messages ) : email_subject = ( "You've received %s new message%s on your explorations" % ( len ( feedback_messages ) , ( 's' if ( len ( feedback_messages ) > 1 ) else '' ) ) ) email_body_template = 'Hi %s,<br><br>You\'ve received %s new message%s on your Oppia explorations:<br><ul>%s</ul>You can view and reply to your messages from your <a href="https://www.oppia.org/dashboard">dashboard</a>.<br>Thanks, and happy teaching!<br><br>Best wishes,<br>The Oppia Team<br><br>%s' if ( not feconf . CAN_SEND_EMAILS ) : log_new_error ( 'This app cannot send emails to users.' ) return if ( not feconf . CAN_SEND_FEEDBACK_MESSAGE_EMAILS ) : log_new_error ( 'This app cannot send feedback message emails to users.' ) return if ( not feedback_messages ) : return recipient_user_settings = user_services . get_user_settings ( recipient_id ) messages_html = '' for ( _ , reference ) in feedback_messages . iteritems ( ) : for message in reference [ 'messages' ] : messages_html += ( '<li>%s: %s<br></li>' % ( reference [ 'title' ] , message ) ) email_body = ( email_body_template % ( recipient_user_settings . username , len ( feedback_messages ) , ( 's' if ( len ( feedback_messages ) > 1 ) else '' ) , messages_html , EMAIL_FOOTER . value ) ) _send_email ( recipient_id , feconf . SYSTEM_COMMITTER_ID , feconf . EMAIL_INTENT_FEEDBACK_MESSAGE_NOTIFICATION , email_subject , email_body , feconf . NOREPLY_EMAIL_ADDRESS )
sends an email when creator receives feedback message to an exploration .