Ask HN: Easiest way to set up email form?
I'd like to have a simple static website with a form that would send the filled data to my email. What would be the easiest setup to achieve this? I would like to avoid using PHP or another language and handling the e-mail myself to keep the website as simple as possible. JavaScript is incapable of doing it and it would expose credentials. So I guess I am looking for a simple mailing service..
12 comments
[ 3.3 ms ] story [ 40.9 ms ] threadIt is not perfect, but it works for my very little volume and hides my email to the outside (I rarely get spam on the email address linked to the contact form).
No credentials are exposed and you can prevent abuse with reCAPTCHA.
https://aws.amazon.com/blogs/architecture/create-dynamic-con...
I’ve played with formspree before. It’s pretty straightforward and you can get pretty far with the free plan.
SendGrid is cool and allows for much more flexibility with emails like custom variables, I recently rebuilt my email templates with MJML but I really wish there was just an easy service that allowed you to POST to an endpoint, supported double opt in and gave you that level of control.
After researching it became clear I was going to have to setup some kind of custom backend for my Gatsby site or use a server less function service and write the code myself.
You can get a free newsletter subscription account going with ConvertKit, and add your form url to get started with collecting sign ups right out of the box.
It’s built with Next.js, Tailwind CSS, Markdown loader, and a bunch more.
It doesn’t cost anything, and you can host on Vercel or Netlify for free :)
https://github.com/elegantframework/elegant-cli
https://www.elegantframework.com/docs/convertkit
[0] https://tally.so/
You can also write your own using something like Cloudflare workers or an AWS Lambda function. We did that for our production website.
You can have a form that just makes a mailto: link with the subject, email, and body all filled out based on the form, and then it opens their mail program.
https://letsform.dev
at least you can spare the boilerplate code of the front end