send_reset_email = async (user, req, options = {}) => {
  const { link, token } = await get_reset_link(user, req);
  const transporter = await getMailTransport();
  const reset_password_email_view_name = getState().getConfig(
    "reset_password_email_view",
    false
  );
  let email;
  if (reset_password_email_view_name) {
    const reset_password_email_view = await View.findOne({
      name: reset_password_email_view_name,
    });
    if (reset_password_email_view) {
      const html = await viewToEmailHtml(reset_password_email_view, {
        id: user.id,
        _unhashed_reset_password_token: token,
      });
      email = {
        from: getState().getConfig("email_from"),
        to: user.email,
        subject:
          reset_password_email_view.attributes?.page_title ||
          `${req.__("Hi %s", user.email)}`,
        html,
      };
    }
  }
  if (!email) email = generate_email(link, user, req, options);
  await transporter.sendMail(email);
}
@param {object} user
@param {object} req
@returns {Promise<void>}