Plain HTML form
Point any HTML form at RavenMail. It needs no JavaScript, and it looks however your own CSS says.
<form action="https://theraven.email/f/your-form-id" method="post" enctype="multipart/form-data">
<label>Name <input type="text" name="name" required></label>
<label>Email <input type="email" name="email" required></label>
<label>Subject <input type="text" name="subject"></label>
<label>Company <input type="text" name="f_k7m2qa"></label>
<label>Message <textarea name="message" required></textarea></label>
<label>Files <input type="file" name="attachments" multiple></label>
<div style="position:absolute;left:-9999px" aria-hidden="true"><input type="text" name="website" tabindex="-1" autocomplete="off"></div>
<button type="submit">Send</button>
</form>
The Share tab of each form generates this markup with your real address and your own fields, in the order you set.
Field names
name- Required.
email- Required, and it has to be a valid address. Your replies go to it.
subject- Only read when the subject field is turned on for the form. If you made it required, it has to be filled in.
message- Required.
- Custom fields
- Each one has a name that starts with
f_, likef_k7m2qa. Find yours in the Share tab. For checkboxes, send the same name once for every ticked option. attachments- Files, when attachments are turned on for the form. Up to 5 files of 10 MB each, and the form needs
enctype="multipart/form-data". website- A trap for bots. Keep it in the form, hidden and empty. A message that arrives with it filled in is thrown away, while the sender still sees a success.
After a send
The browser goes to a RavenMail page with your confirmation text, or to your redirect address if you set one. When something is wrong, like an empty required field, RavenMail shows a page that lists the problem and links back to your form.
Sending with fetch
Add the header Accept: application/json and RavenMail answers with JSON instead of a page.
const response = await fetch("https://theraven.email/f/your-form-id", {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(form),
});
const result = await response.json();
200- Accepted. RavenMail delivers it from here.
{"ok": true} 202- You turned on the visitor check, so the message waits until the visitor passes it. Send them to the address in
"verify_url".{"ok": false, "verify_url": "https://theraven.email/f/your-form-id/verify/..."} 400- Something in the message is wrong.
"errors"maps each field name to its problems, and problems with the message as a whole sit under__all__.{"ok": false, "errors": {"__all__": ["Your message has too many links."]}} 429- Too many messages from the same connection, or the account reached its limit for the day or the month. Same shape as a
400. 404- The form is not taking messages right now. Same shape as a
400. A form id that never existed gets a plain HTML 404 page instead of JSON.
Any site can read these answers, unless you listed allowed domains under Share. Then only those sites can.
Spam rules
- The
websitefield has to stay empty. - One connection can send up to 5 messages to a form every 10 minutes, and up to 30 an hour across all forms.
- A message with more than 5 links, counted across name, subject and message, is refused.
- Each account takes up to 10 messages a day and 250 a month, across all of its forms.
- A request larger than 2.5 MB is refused before it is read, unless the form takes attachments.
- Optional: turn on "Check visitors of the plain HTML form" under Share. Each message then waits on a RavenMail page while the visitor's browser solves a short spam check, and it is only delivered after that.