Why It Matters
Mailto links reduce friction. Instead of asking someone to copy your email address, open their mail app, paste it in, and type a subject line, you hand them a one-click shortcut. They're especially useful on contact pages, support footers, and anywhere you want to make it dead simple for someone to reach out.
How It Works
The basic syntax is straightforward: <a href="mailto:hello@example.com">Email us</a>. You can also pre-fill the subject, body, CC, and BCC fields by adding query parameters:
mailto:hello@example.com?subject=Quick%20Question&body=Hi%20there
The catch? Mailto links expose your email address in the page source, which makes it easy pickings for spam bots. If that's a concern, consider obfuscating the address with JavaScript or using a contact form instead.
Quick Tips
- Always URL-encode spaces and special characters in subject and body parameters
- Don't rely on mailto links as your only contact method -- some users don't have a default email client configured
- Use them in email signatures and transactional footers to encourage replies