Skip to content

No-code4 min read

Add a “Share by email” link in Webflow

Introduction

Mailto parameterDescriptionExample
toRecipient (leave blank to let them choose)
subjectEmail subjectCheck out this article
bodyEmail body (URL-encoded)https://your-site.com/article

In this tutorial, Sandro, co-founder of the Gemeos Webflow agency, shows you how to add a "Share by email" link in Webflow.

Adding a "Share by email" button to a website comes with a few perks:

  1. Makes sharing easy: The "Share by email" button lets users quickly share site content with friends, family, or coworkers through their inbox. That can be handy for spreading important or interesting information.
  2. Expands your reach: Email is still a widely used way to communicate, even in the age of social media. By adding this sharing option, you let your content reach a broader audience that may not be active on social platforms.

Here’s how to do it!

1. Add a trigger element to your page

You can use any element you want, such as a Div or Link.

Webflow Email Tutorial

2. Add the id "mail" to it

Webflow Email ID Tutorial

3. Add this custom code

You can add it before the <body> on your page, or drop it straight into an embed inside your element.

<script>
// Function to open a new email with the current page link
function openNewEmail() {
// Get the current page URL
var url = window.location.href;`

`// Encode the URL for the email body
var encodedUrl = encodeURIComponent(url);`

`// Create the mailto link with the body text
var mailtoLink = "mailto:?body=" + encodedUrl;`

`// Open a new tab with the mailto link
window.open(mailtoLink);
}`

`// Add a click event listener to the div with the id "mail"
var mailDiv = document.getElementById("mail");
mailDiv.addEventListener("click", openNewEmail);
</script>

4. Publish and test the result

Webflow Tutorial Example

Published on Apr 10, 2025

Sandro DA SILVA

Growth Marketer, Webflow expert, and jack-of-all-trades. Sandro handles commercial operations, ensures projects run smoothly, and addresses marketing-related issues (SEO, Tracking, Copywriting, etc).

You might be interested in these tutorials

Related tutorials

See all

You're going to working with us, guaranteed

Ready to launch your business?

get a quote

Let’s f*****G GO !!