A mailto link that carries the chosen package in its subject
How an enquiry button opens an email with a finished subject. With encoding, two tests, the chosen package in the subject and the phone as a second route.Each of the four offer pages on jexcellence.de has an "Enquire" button under every package. Until November 2026 that button led to the closing section of the page, from there to the home page, and only there did an email open, with the subject "Project enquiry". Which package the visitor had picked was recorded nowhere. This post shows how that became one click, without a contact form and without a server.
The count on /de/mittelstand from 9 November 2026: the button in the page header and the three package buttons linked to the anchor #cta at the bottom. The closing section there linked to /de#contact, which is the home page. Only its contact area opened the email. The pages for startups, beauty studios and Minecraft servers behaved the same way, in German and in English.
A visitor who had settled on one package had to type it into the email again. Or did not, and the first reply was a question back.
A link that starts with mailto: opens the visitor's mail program. Subject and text can follow the address, separated as in any other URL:
The question mark starts the parameters and the & separates them. Hand-built links break right there: a subject like "Studio & Shop" contains an & of its own. Without encoding the subject ends at "Studio " and the rest counts as a new parameter.
The function that builds every enquiry link on the jexcellence.de offer pages is one line long:
encodeURIComponent replaces every character that has a meaning of its own inside a URL. & becomes %26, a line break becomes %0A, and umlauts and brackets are rewritten as well. The mail program turns all of it back into readable text.
Encode the subject and the text separately. Encoding the whole link in one go also destroys the ? and the & that are supposed to separate the parameters.
You cannot tell by looking whether a link is right. So two tests build a link, parse it with the URL parser and compare what comes out:
The second test uses a subject with a colon, hyphens and brackets, and a text with blank lines. If both come back unchanged, the encoding holds.
The subject comes from two templates:
The topic belongs to the page, for example "Software modernisation" or "Beauty studio website". The package comes from a click. The page remembers the name of the package whose button was pressed, and the closing section rebuilds the link from it. Shortened, it looks like this:
The package button still jumps to the closing section. The only new part is that it stores the name first. A visitor who scrolls down without picking a package gets the subject with the topic alone.
A subject that changes unnoticed helps nobody. After a choice, one sentence appears above the buttons: "Chosen package: name. It goes into the subject of your email." The line carries aria-live="polite" so that a screen reader announces the change too. It keeps a fixed minimum height even while it is empty.
The address holds the page topic and the package name, and nothing about the visitor. The email text is a template of four lines to fill in:
The template saves the questions that otherwise follow the first email. Nothing is sent until the visitor presses "Send" in their own program.
A mailto link needs a mail program that is set up. Someone who reads mail only in the browser and has configured nothing for it clicks, and nothing happens. So the phone number sits next to the email button as a button of the same size with a tel: link, and below both a small link "All ways to get in touch" leads to the contact area of the home page.
Below 768 pixels the two buttons stack and fill the row. Plain CSS handles that, so the layout is right before any JavaScript has loaded:
It was measured at widths of 1920, 390 and 320 pixels in both languages: subject and note are correct and nothing runs past the edge. How individual mail programs open the link has not been tested.
- Encode subject and text separately with encodeURIComponent, never the whole link.
- Write a test that parses the link with new URL(). An & in the subject belongs in that test.
- Put into the subject only what the page already knows. Nothing about the visitor.
- Show what gets prefilled and announce the change with aria-live.
- Offer a second route next to it: the phone, or the address in plain sight.