code: def make_message(subject_or_message: Union[str, Message],
                   to: Union[str, List[str]],
                   template: Optional[str] = None,
                   **kwargs):
      
      if isinstance(subject_or_message, Message):
          return subject_or_message
  
      if isinstance(to, tuple):
          to = list(to)
      elif not isinstance(to, list):
          to = [to]
      msg = Message(subject=subject_or_message, recipients=to, **{
          k: kwargs[k] for k in message_kwargs & set(kwargs)})
  
      if not msg.html and template:
          msg.html = render_template(template, **kwargs)
      if not msg.body:
          msg.body = get_message_plain_text(msg)
      return msg
docs: Creates a new :class:`~flask_mail.Message` from the given arguments.
  
      :param subject_or_message: A subject string, or for backwards compatibility with
                                 stock Flask-Mail, a :class:`~flask_mail.Message` instance
      :param to: An email address, or a list of email addresses
      :param template: Which template to render.
      :param kwargs: Extra kwargs to pass on to :class:`~flask_mail.Message`
      :return: The created :class:`~flask_mail.Message`