def send_query_completion_email(recipient_id, query_id):
 email_subject = ('Query %s has successfully completed' % query_id)
 email_body_template = 'Hi %s,<br>Your query with id %s has succesfully completed its execution. Visit the result page <a href="https://www.oppia.org/emaildashboardresult/%s">here</a> to see result of your query.<br><br>Thanks!<br><br>Best wishes,<br>The Oppia Team<br><br>%s'
 recipient_user_settings = user_services.get_user_settings(recipient_id)
 email_body = (email_body_template % (recipient_user_settings.username, query_id, query_id, EMAIL_FOOTER.value))
 _send_email(recipient_id, feconf.SYSTEM_COMMITTER_ID, feconf.EMAIL_INTENT_QUERY_STATUS_NOTIFICATION, email_subject, email_body, feconf.NOREPLY_EMAIL_ADDRESS)

def send_query_completion_email ( recipient_id , query_id ) : email_subject = ( 'Query %s has successfully completed' % query_id ) email_body_template = 'Hi %s,<br>Your query with id %s has succesfully completed its execution. Visit the result page <a href="https://www.oppia.org/emaildashboardresult/%s">here</a> to see result of your query.<br><br>Thanks!<br><br>Best wishes,<br>The Oppia Team<br><br>%s' recipient_user_settings = user_services . get_user_settings ( recipient_id ) email_body = ( email_body_template % ( recipient_user_settings . username , query_id , query_id , EMAIL_FOOTER . value ) ) _send_email ( recipient_id , feconf . SYSTEM_COMMITTER_ID , feconf . EMAIL_INTENT_QUERY_STATUS_NOTIFICATION , email_subject , email_body , feconf . NOREPLY_EMAIL_ADDRESS )
send an email to the initiator of a bulk email query with a link to view the query results .