How can i create a link to create an email with a subject
Asked by J?rgen Gra?er:

Hi!

My target is, that a user can create an email with a defined receiver and a defined subject with one click.

I am using Confluence 5.10.8

The solution to create a new email is very easy.

(<https://confluence.atlassian.com/conf51/using-a-link-to-create-a-new-email-message-336169395.html>)

Insert -\> Link, enter the email adress and i have my link including the mailto-function.

Now i want to use the mailto-function including a subject like on this page

<https://community.atlassian.com/t5/Confluence-questions/Could-I-create-a-mailto-link-with-subject-that-dynamically-fills/qaq-p/272015>

Unfortunately i don't know how to add this macro

"\<a href="mailto:m.mustermann@domain.com?subject=Here%20is%20the%20subject"\>linkname\</a\>"

into confluence.

And i don't know how to use the " report macro" from the second link in this questions, because i can't find this macro.

Does someone have an idea with perhaps some screenshots?

Thank you in Advance!

J


Answers:
author: Shannon S
body: Hi J?rgen,

The example you gave works.

![Screen Shot 2017-11-08 at 3.46.42 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/9036iF97808A9E6C6FAF1/image-dimensions/708x212?v=v2 "Screen Shot 2017-11-08 at 3.46.42 PM.png")

Essentially, you just write your text on the Confluence page, highlight it, click Insert Link, and choose Web link. Then you can paste this in the address:

```
mailto:m.mustermann@domain.com?subject=Here%20is%20the%20subject
```

Then, when clicking that link in the saved page, it automatically opens an email window with the recipient and the subject already filled in. I've tested this in Confluence 6.5.0.

In terms of the Reporting Macro, I'm not really sure what Heidi is referring to. It could possibly be the [Reporting Macro](https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.reporting/server/overview) from ServiceRocket.

Kind Regards,  
Shannon

comments: author: Derek Price
body: I tried this on Confluence Cloud. It worked while I was in Edit mode but as soon as I published, the link got scrubbed. I don't know if it matters, but I was setting both a subject and a body.


author: BenJoaquin Gouverneur
body: On Confluence Cloud, I've been able to set the \`subject\` but when I add \`body\` the link is lost and you are left with blue underlined text. In the editor you can create a link like this:\`mailto:user@example.com?subeject=my%20subject\&body=my%20body\` but as Derek mentions above, it fails silently and rather inelegantly during publishing.

Perhaps worth noting, you don't need to explicitly add \`%20\` for spaces, when creating the links, Confluence will insert them for you.


author: Yuriy Buha
body: Yes, same here. Adding body and testing before saving works great, but after saving it, the link no longer works and it is just a formatted string


author: Conrad Conlin
body: none of this works

comments: author: Shannon S
body: Hello Conrad,

Welcome to Atlassian Community. It's nice to meet you.

The specific instructions on this thread are for Confluence Server as it was 2 years ago, but the idea is still the same for Confluence Cloud.

I've created a video below that will help you to do this in Cloud on the new editor, as I suspect this is what you are using.

* [Link to my video](https://screencast-o-matic.com/watch/cqjQooO8YR)

Could you give this a try and let me know if it works?

Regards,

Shannon


author: POMAL
body: What about multiple recipients, and the body issue?


author: Shannon S
body: Hi Daniel,

My apologies, I missed when [@Derek Price](/t5/user/viewprofilepage/user-id/914460) and [@BenJoaquin Gouverneur](/t5/user/viewprofilepage/user-id/2156554) mentioned this issue.

I'm using the new editor, and I just formatted my link like this, and it works:

![CleanShot 2019-12-11 at 11.42.19.png](https://community.atlassian.com/t5/image/serverpage/image-id/75886i2F5BFCFB431A1ADB/image-size/large?v=v2&px=999 "CleanShot 2019-12-11 at 11.42.19.png")

```
mailto:user1@domain.com;user2@domain.com?subject=Here%20is%20the%20subject&body=Test%20Body
```

When I click this link, it opens up the email like this, which looks right to me:

![CleanShot 2019-12-11 at 11.40.36.png](https://community.atlassian.com/t5/image/serverpage/image-id/75887i6BA3E514A3338F4A/image-dimensions/357x357?v=v2 "CleanShot 2019-12-11 at 11.40.36.png")

Can you let me know how that goes?

Regards,

Shannon


author: Nour Durra _ Nagarro
body: Hi [@Shannon S](/t5/user/viewprofilepage/user-id/510046)

is there a way to add a variable in the mailto link so the subject is dynamic and writes the page title? I don't want static text as in the example you provided


author: Shannon S
body: Hi [@Nour Durra _ Nagarro](/t5/user/viewprofilepage/user-id/2836656),

Thank you for following-up on this thread. It's not possible to use variables in the Link Macro, and would likely require writing a [User Macro](https://confluence.atlassian.com/doc/writing-user-macros-4485.html) which is only possible in Confluence Server.

You could also check out some of the various add-ons available from [Atlassian Marketplace](https://marketplace.atlassian.com/search?hosting=cloud&product=confluence&query=). There may be one available that can help you with this requirement.

Regards,

Shannon


author: Mia Gaventa
body: [@Shannon S](/t5/user/viewprofilepage/user-id/510046) Is it possible to create a macro, like in the video above, but for an email with Subject and Body static text but no recipients (which can be added once the email is linked to)?


author: Shannon S
body: Hi [@Mia Gaventa](/t5/user/viewprofilepage/user-id/3503820),

I believe that may indeed be possible, but I unfortunately don't have much practice myself in writing User Macros. You could ask this as a new question in the Confluence collection, and some of our more experienced User Macro writers will be able to help you out!

Shannon


author: Geoffrey Callaghan
body: you could use this [mailto link generator](https://mailto-link-generator.surge.sh/)


Tags: confluence-cloud