3
11 Comments

Email contact form?

How do you guys set up your email contact forms (like newsletters or even just for your "Contact us" section or whatever)? I swear I've been messing with sendmail and postfix for hours and still my emails are sent from the wrong hostname or just aren't sent at all. Am I an idiot or is there an easier way?

  1. 2

    As others have said https://www.netlify.com/docs/form-handling/
    I've just added it to a services website under construction:
    or alternatively use https://formspree.io/
    But netlify is Unlimited so its a little better.

  2. 2

    Haven't worked with the tools you mentioned but if you don't have a backend checkout Netlify, it has a forms handling feature: https://www.netlify.com/docs/form-handling/

    1. 2

      I'm using this on a quick website I put together a couple of day ago (https://leaguetokens.com/), it works so well and means you don't have to set up any backend infrastructure until you're ready.

  3. 1

    I have used Netlify and I would definitely recommend it.

  4. 1

    Direct link to gmail (SMTP) or call the SparkPost API. The approach varies based on the project but both have been pretty fool-proof for me so far. I have some spam filter issues with SparkPost but none so far with Gmail directly.

  5. 1

    http://usebasin.com for the form handling (1 free form). Also http://surge.sh for the free static webpage hosting (very simple CLI - type 'surge' in the working directory and it pushes to its CDN with a subdomain of your choosing - free to use a secure custom domain also). Netlify seemed needlessly clunky to me.

  6. 1

    Good news: after way too many hours, I got it working properly. I've done it before and for some reason it always seems to be a nightmare.

    But if you're reading this and want a good solution, the posted ones are great, and so is howdyform.com

  7. 1

    It seems you have built the form yourself and now you just struggle to setup a mail server. What about third-party transactional email providers? Like Mailgun, Sendgrid, Sparkpost, Sendinblue, Amazon SES, ...? They provide you an API or SMTP, hassle-free.

  8. 1

    Haha, yes postfix can be quite annoying. Reading the documentation should do the trick. There can only be one hostname, I think. That's because the receiving server usually does a reverse lookup of the connecting mail server and if they do not match your are usually considered spam. If you are speaking of the hostname in the FROM field like hi@kanji-book.com that's completely up to your mail client. I can't speak of sendmail because I never used that.

    Personally I use a combination of postfix and mailchimp.

    1. 1

      See, I think my problem was is that I wanted them sent to my GSuite email, but for some reason the server kept sending them to itself because I configured it as an "Internet Site" or whatever the option is and I didn't even know what to Google to solve my problem, but I got it working properly now 🙂

  9. 1

    https://www.netlify.com is the easiest way to use email/contact/subscription forums.

    It took me 10 minutes to setup the subscription page for my website.