def METHOD_NAME(
    self, livesessions, step, mail_object, trans_context=None, template="reminder"
):
    """Send email with template and update reminders field."""
    trans_context = trans_context or {}
    for livesession in livesessions:
        # For each livesession we send the email
        # if record was updated
        if self.query_to_update_step(livesession, step) == 1:
            with override(livesession.language):
                self.stdout.write(
                    f"Sending email for livesession {livesession.id} "
                    f"for video {livesession.video.id} step {step}"
                )
                # send email with the appropriate template and object
                context = {
                    "cancel_reminder_url": livesession.cancel_reminder_url,
                    "email": livesession.email,
                    "time_zone": settings.TIME_ZONE,
                    "username": livesession.username,
                    "video": livesession.video,
                    "video_access_url": livesession.video_access_reminder_url,
                }
                if trans_context:
                    context = context | {
                        key: _(value) for key, value in trans_context.items()
                    }
                msg_plain = render_to_string(
                    f"core/mail/text/{template}.txt", context
                )
                msg_html = render_to_string(
                    f"core/mail/html/{template}.html", context
                )
                try:
                    send_mail(
                        subject=_(mail_object),
                        message=msg_plain,
                        from_email=None,
                        recipient_list=[livesession.email],
                        html_message=msg_html,
                        fail_silently=False,
                    )
                    self.stdout.write(
                        f"Mail sent {livesession.email} {_(mail_object)}"
                    )
                except smtplib.SMTPException as exception:
                    # send error to sentry and print it
                    livesession.update_reminders(settings.REMINDER_ERROR)
                    self.stderr.write(f"Mail failed {livesession.email} ")
                    capture_exception(exception)