5
kiki
299d

If you somehow, someway, for any reason didn’t know it, emails are valid action attributes for HTML forms.

Yes.

You can submit forms to emails, and it works for ages now. Backend isn’t needed.

Comments
  • 0
    So does it open an email client?
  • 1
    Backend isn't needed.

    Ohh boy 🤣🤣
  • 6
    I mean, it's essentially just a "mailto" link that'll open your mail client with a prefilled email and message body. It's useless at worst and terrible UX at best for just about every scenario I can think of - but sure, if that fits your use case and your backend is doing nothing else, then by all means scrap it 🤷‍♂️
  • 1
    Terrible user experience.. Email should already be sent on form submit. Doing this will throw user to their mail client app instead, and they have to press the send button again, there.
  • 1
    Interesting to know browsers have actually implemented this.

    The spec is pretty vague on this part, it states it can be any valid URL. Supposedly, this includes mailto: sms: and even tel:

    I like to think of a world where some browser has implemented tel: by calling someone and using a text-to-speech program to tell the person on the other end what you intend to submit.

    https://html.spec.whatwg.org/multip...
  • 1
    We need answers here @kiki, does it open the local mail client and prefill a mail, or does it actually send it?

    My job security depends on your answer!

    Best regards
    Backend
Add Comment