I built a free API that you can submit HTML forms to and receive the data to your email - attachments included!
Why did I make it?
I wanted an easy way to make contact forms for static websites. With MailSlurp forms you can now create forms that submit to your email address without any server or Javascript.
Example
Just POST
any HTML form to https://api.mailslurp.com/forms?_to=YOUR_EMAIL_ADDRESS
.
<form action="https://api.mailslurp.com/forms?_to=YOUR_EMAIL" method="post">
<!-- include any form fields, even files -->
<textarea name="example"></textarea>
</form>
Any named input field will be put into a table and sent to your email address within seconds.
Attachments
You can add files too by adding an enctype="multipart/form-data"
attribute to your <form>
element.
<form
action="https://api.mailslurp.com/forms"
method="post"
enctype="multipart/form-data">
<input multiple name="files" type="file">
<button type="submit">Send to me</button>
</form>
More settings
You can set the subject, bcc, cc of the email and more by adding query parameters to the url. You can see a full list of config options here.
You can also alias or mask your email address behind an MailSlurp ID so that your email address is not exposed to the public.
<form action="https://api.mailslurp.com/forms" method="post">
<!-- hide email with an alias (create a free account for this) -->
<input
type="hidden"
name="_toAlias"
value="9b32cb34-e75a-48a6-8f6c-817204c354e7"
/>
<!-- data to submit -->
...
</form>
Get started
MailSlurp forms are free :). If you want extra features like on demand email addresses, or a MailServer API then you can explore MailSlurp's paid account. Have fun!
Top comments (4)
Awesome! I've seen an app like this before, but never included attachments. Congrats!
Nice ❤
Interesting and useful project 👌🏻👌🏻, how long does it take (more or less) to send the email? 👌🏻 👌🏻
I believe a few seconds, normally under ten.