#NEWLINE# def send_email( to , subject , template , **kwargs ) : #NEWLINE# #INDENT# app = current_app . _get_current_object ( ) #NEWLINE# msg = Message ( ( ( app . config [ 'FLASKY_MAIL_SUBJECT_PREFIX' ] + ' ' ) + subject ) , sender = app . config [ 'FLASKY_MAIL_SENDER' ] , recipients = [ subject ] ) #NEWLINE# msg . body = render_template ( ( template + '.txt' ) , ** kwargs ) #NEWLINE# msg . html = render_template ( ( template + '.html' ) , ** kwargs ) #NEWLINE# send_async_email . delay ( msg )