def send_email(self, register_user):
try:<EOL><INDENT>from flask_mail import Mail, Message<EOL><DEDENT>except Exception:<EOL><INDENT>log.error("<STR_LIT>")<EOL>return False<EOL><DEDENT>mail = Mail(self.appbuilder.get_app)<EOL>msg = Message()<EOL>msg.subject = self.email_subject<EOL>url = url_for(<EOL>"<STR_LIT>",<EOL>_external=True,<EOL>activation_hash=register_user.registration_hash,<EOL>)<EOL>msg.html = self.render_template(<EOL>self.email_template,<EOL>url=url,<EOL>username=register_user.username,<EOL>first_name=register_user.first_name,<EOL>last_name=register_user.last_name,<EOL>)<EOL>msg.recipients = [register_user.email]<EOL>try:<EOL><INDENT>mail.send(msg)<EOL><DEDENT>except Exception as e:<EOL><INDENT>log.error("<STR_LIT>".format(str(e)))<EOL>return False<EOL><DEDENT>return True<EOL>
Method for sending the registration Email to the user