mailto: link works in edit mode but not after save?
Asked by Warren LaFountain:

I'm working on a Knowledge Base Space and had an idea that service would be enhanced if a support link could be emailed right from the sight. After some trial \& error I created this link:

mailto:?subject=iPhone Screen Rotation\&body=Hello,%0D%0A%0D%0AHere is the link to some more information.%0D%0A%0D%0ATo view it, please click the following link:<https://support.apple.com/en-ca/HT204547.%0D%0A%0D%0AThank> You.%0D%0A%0D%0A

It works in edit mode but stops being a link once I hit save.

Does anyone know how I can preserve the link on the page?


Answers:
author: Steven F Behnke
body: Yes exactly. Can I ask if you're on Confluence Cloud or Confluence Server? I have a quick workaround but it only works on Confluence Server.

If your instance of Confluence has the {html} macro enabled, you can enter the HTML manually --

```
&lt;a href="mailto:?subject=iPhone Screen Rotation&amp;body=Hello,%0D%0A%0D%0AHere is the link to some more information.%0D%0A%0D%0ATo view it, please click the following link:https://support.apple.com/en-ca/HT204547.%0D%0A%0D%0AThank You.%0D%0A%0D%0A"&gt;Text here&lt;/a&gt;
```

I haven't found a way around Confluence stripping it out yet.

comments: author: Warren LaFountain
body: I'm just becoming familiar with Confluence. How would I go about requesting that they fix the stripping problem? It wouldn't be so bad if it also didn't work in edit, but it does ![sad](/html/@C495B4504065515364EB1894F812B34C/images/emoticons/sad.png "sad").


author: Steven F Behnke
body: I'm looking around the web -- There's related questions here on Answers but none seem to have a distinct feature-request linked to them.

I have a theory -- The Confluence editor is based on TinyMCE -- I believe TinyMCE supports this style of links *but* the XML format Confluence uses *doesn't*. I actually believe this style of link is generating invalid XML markup, so Confluence rejects it.

I think you should also look into User Macros -- Administrators in your system can define a new **User Macro** which you can input parameters into. This could possibly be a good and fast work-around, if you're able to add these.


author: Steven F Behnke
body: There appears to be an older Bug Report here -- <https://jira.atlassian.com/browse/CONF-24880>

It's a little out of date -- The editor has changed since then, thus the bug presents differently than described in the Bug Description. The presented workaround in the comments appear to be to use User Macros or to escape the characters properly. I am not sure if they still are applicable.


author: Warren LaFountain
body: Hi Steven

I've copied the space over to our UAT environment (where I have more admin privileges). The HTML macros are enabled, and I've copied the HTML from your previous post. When I try the link, it still strips the code and in edit mode, it now goes to a page not found error.

Any ideas on what I can try now?


author: Steven F Behnke
body: Arghh!! I thought I had it worked out --

Mine works properly, the exact example I used. To be more specific, I'm using Confluence 5.9.5. I would **imagine** (but could be wrong) that it would work for you too. If you changed something, could you post the new content so we can inspect it?


author: zaphnet
body: Similar problem with "#" in email addresses.

mailto:#example@example.com will not "pop" email dialog and will not be editable after save.

Workaround with html macro:

\<a href="mailto:#example@example.com?subject=Testing out mailto!"\>#example@example.com\</a\>

Problem repeated on Confluence 6.14.3 Server.

Not sure that I agree that problem is "Solved" when there is a workaround? Why not stick to the html standard instead? But I guess its what the company finds being the company standard? Good enough or do it right?


author: Steven F Behnke
body: I would suggest trying to insert the macro from the Insert \> Other Macros dialog. If it doesn't appear, it is disabled still.

The admin must find the HTML macro add-on and enable the HTML macro module. The documentation is located here -- <https://confluence.atlassian.com/doc/html-macro-38273085.html>


author: Derek Price
body: I'm still seeing this problem in Confluence Cloud. The link worked until I published the page, then it gets scrubbed. I may try the .msg file as a workaround.


author: Rodney Hughes
body: Not sure if this is too simplistic for whatever you are trying to do

But just type or paste the email address into the body of the page - in normal view when the User clicks the email address it will open a blank email for them.

Or another method is to create a "template" email on your PC complete with To, CC, subject, text and attachments ...  
Then (I know I can do this in Outlook) just select that draft and drag it on to your desktop - it becomes its own ".msg" file.  
Now attach that file to your Confluence page.  
When a User clicks the ".msg" file link on the page, it opens up a copy of the template email for them to edit and send.


author: Warren LaFountain
body: We're on a Confluence server (recent update I think). How can I find out if the HTML macro is enabled and if it isn't are there very explicit instructions I can pass onto our admins?


author: Warren LaFountain
body: Is this what you're looking for?

```
mailto:?subject=iPhone Screen Rotation&amp;body=Hello,%0D%0A%0D%0AHere is the link to some more information.%0D%0A%0D%0ATo view it, please click the following link:https://support.apple.com/en-ca/HT204547.%0D%0A%0D%0AThank You.%0D%0A%0D%0A
```

mailto:?subject=iPhone Screen Rotation\&body=Hello,%0D%0A%0D%0AHere is the link to some more information.%0D%0A%0D%0ATo view it, please click the following link:<https://support.apple.com/en-ca/HT204547.%0D%0A%0D%0AThank> You.%0D%0A%0D%0A  


author: Steven F Behnke
body: can you post the link in a {noformat} macro so we can see the URL in it's full glory?