HTML's mailto on steroids

Webdev

Jonas' article on the capabilities of HTML's mailto saved my day recently. Seriously useful stuff.

The problem of technically not being able to use forms

A couple of contact forms could not have been implemented due to technical limitations. However, the possibility of a pre-filled text, contact options and distinct recipients for the contact inquiry were needed. After some investigation I stumbled upon Jonas' article above and decided to go that route.

The solution

Instead of forms, pre-defined mailto links were used. This way website visitors are provided with pre-filled text they can use in the mails they are eventually writing.

Yes, this requires mail software installed on customer's devices. However, considering technical restrictions, I decided this is a reasonable risk and workaround. I probably wouldn't have used this approach a couple of years ago, but an assumption was that in the mobile and app era nowadays, mail clients on customer's devices are usually available.

Example

<a href="mailto:mail@example.org?cc=cc@example.org">Email with carbon copy</a>

This results in an pre-defined recepient in cc already. Nice!

A quick search also reveals there is a snippet description over at css-tricks.com.