sebastian lochbronner

How to create email links for your website with subject, copy, blind copy and message content

To allow visitors to your website to make a contact request, you don't necessarily need a complicated form. You can create a link with just one line of code,
May 8, 2019

To allow visitors to your website to contact you, you don't necessarily need a complicated form. You can create a link with a single line of code that will send the most important information. When the link is clicked, the visitor's default email program will open and they can easily send you a message. You can even predefine parts of the content and subject line, as well as multiple recipients with just one line of code. How this works, you will learn in this article.

1. simple email link

This link is a very simple link with no defaults. The code looks like this:

<a href="">Write email</a>

2. specify multiple recipients

With this code line you can directly specify who else should receive this email:

<a href=",">Write email to two people</a>

3. preset email with subject

This default is especially handy because you can easily recognize and filter e-mails based on the subject. So you know, for example, whether an email is important or urgent.

<a href=" steht der Betreff">E-mail with subject</a>

4. create a visible copy of the e-mail

This e-mail is sent by copy to another recipient. This address is visible to the one who composes the email.

<a href="">E-mail with copy</a>

5. create invisible copy of the email

However, if you do not want the author of the e-mail to see who else the e-mail is being sent to, as in point 4, you can specify a so-called blind copy and have it sent.

<a href="">E-mail with blind copy</a>

6. e-mail with message text default

You can also specify some content for the e-mails, but you have to keep in mind to specify the content in coded form.

An example might look like this:

<a href=" John, hier steht die Nachricht.">Write email</a>

Combine everything together

Of course, you can not only specify the individual things as described in points 1-6. You can also combine everything and create a perfect email template with all the content you need from the author. Here you must note that all individual attributes must be connected with the abbreviation &, otherwise errors may occur or content may simply be missing.

<a href=" steht der Betreff&amp;body=Hallo John, hier steht die Nachricht.">Write email with subject and prepared message</a>

As you can see, it is very easy to get as much information with just one link as with a form. You just have to create the link and insert it into your website at the desired place in the HTML code - done!

Send email
Say hi!

Sebastian Lochbronner
86830 Schwabmünchen


Lochbronner Design Studio goes codeblick - read article here