Example of any plugin with form with a post request

@pfaffman We want to create a simple form that prompts the user for four things:

  1. Sender
  2. Receiver
  3. Subject
  4. Body

The user will fill out these fields, and then click a button to trigger an endpoint that sends the email.

Specifically, the form will include the four elements, and once the “Send” button is clicked, it will invoke the endpoint to send the message.

I’m not sure if that’s exactly what you’re looking for, but the main goal is to allow an admin user to input text (the email subject and body) and click a button to send it to a user in Discourse.

In the future, we’d like to extend this so that the user can trigger multiple messages from one sender to multiple receivers. We want to manipulate parameters like the total number of messages and the delay between each one, to control how many messages are sent and how spaced out they are.