#NEWLINE# def mail_reply( reply , user ) : #NEWLINE# #INDENT# 'Send an e-mail representing the supplied reply to a review.\n\n    Args:\n        reply (reviewboard.reviews.models.Review):\n            The review reply to send an e-mail about.\n    ' #NEWLINE# review = reply . base_reply_to #NEWLINE# review_request = review . review_request #NEWLINE# if ( not review_request . public ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# extra_context = { #NEWLINE# #INDENT# 'user' : reply . user , #NEWLINE# 'review' : review , #NEWLINE# 'reply' : reply , #NEWLINE# #UNINDENT# } #NEWLINE# ( has_error , extra_context [ 'comment_entries' ] ) = build_diff_comment_fragments ( reply . comments . order_by ( 'filediff' , 'first_line' ) , extra_context , 'notifications/email_diff_comment_fragment.html' ) #NEWLINE# reviewer = reply . user #NEWLINE# ( to_field , cc_field ) = build_recipients ( reviewer , review_request , review_request . participants ) #NEWLINE# ( to_field , cc_field ) = filter_email_recipients_from_hooks ( to_field , cc_field , reply_published , reply = reply , user = reviewer , review = review , review_request = review_request ) #NEWLINE# summary = _ensure_unicode ( review_request . summary ) #NEWLINE# reply . email_message_id = send_review_mail ( user , review_request , ( 'Re: Review Request %d: %s' % ( review_request . display_id , summary ) ) , review . email_message_id , to_field , cc_field , 'notifications/reply_email.txt' , 'notifications/reply_email.html' , extra_context ) #NEWLINE# reply . time_emailed = timezone . now ( ) #NEWLINE# reply . save ( )