HACKER Q&A
📣 hknmtt

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..


  👤 tikkun Accepted Answer ✓
The simplest would be an Airtable or Google Form that's set to send new responses to you. You could embed the form in a static html website, or you could make the form itself act as the website.

👤 hoofhearted
This is perfect for Elegant!

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


👤 bombcar
The "mailto:" link is powerful - https://www.w3docs.com/snippets/html/how-to-create-mailto-li...

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.


👤 thek3nger
On my website, I set up a webhook to a Zapier “send email” zap: I have a basic contact form and a button that, in practice, does a POST to the Zapier webhook with the email content.

It 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).


👤 guidone72
I don't know if this covers completely your use case bu you can try this

https://letsform.dev

at least you can spare the boilerplate code of the front end


👤 dimmke
I’ve struggled with this on my site too - I don’t want to custom code a solution so I’ve been using Mailchimp but Mailchimp is gross (it keeps people’s emails even if they unsubscribe)

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.



👤 aarobot
Although you mentioned that you wouldn't like to use JavaScript, I've found EmailJS to work fine. You can use your gmail account as the email provider. I believe the monthly request limit is 200 when using the free plan.

No credentials are exposed and you can prevent abuse with reCAPTCHA.


👤 cweagans
https://github.com/agarrharr/awesome-static-website-services...

I’ve played with formspree before. It’s pretty straightforward and you can get pretty far with the free plan.


👤 codegeek
I have tested https://fieldgoal.io/ they seem decent.

You can also write your own using something like Cloudflare workers or an AWS Lambda function. We did that for our production website.


👤 dmje
I like tally [0]. Lovely people, great functionality. Free. No worries about any of that normal deliverability rubbish.

[0] https://tally.so/


👤 tren
If you host on something like Netlify, it's pretty easy to add it as a netlify form.