def send_template(self, template, to, reply_to=None, **context):
        """
        Send Template message
        """
        if self.provider == "SES":
            self.mail.send_template(template=template, to=to, reply_to=reply_to, **context)
        elif self.provider == "FLASK-MAIL":
            ses_mail = ses_mailer.Mail(app=self.app)
            data = ses_mail.parse_template(template=template, **context)

            msg = flask_mail.Message(recipients=to,
                                     subject=data["subject"],
                                     body=data["body"],
                                     reply_to=reply_to,
                                     sender=self.app.config.get("MAIL_DEFAULT_SENDER")
                                     )
            self.mail.send(msg)
Send Template message