Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence 7.1.0 : mailto with an automatic subject

Nour Durra Nagarro
Contributor
January 17, 2020

I'd like to put a mailto link in a Contact Us button. I'd like to capture the Page Name as the email Subject in addition of course to the email address in the To, is there a variable to do so?

I am able to set the email address, but failing in finding the correct variable to set the subject

1 answer

1 accepted

1 vote
Answer accepted
Sven Schatter _Lively Apps_
Atlassian Partner
January 17, 2020

Hi @Nour Durra Nagarro,

you can indeed set the subject. You can even set a body, CC, or BCC. Example:

temp.jpg

See this link for more info.

Best regards,
Sven

Nour Durra Nagarro
Contributor
January 20, 2020

thanks Sven, but this will result in a static subject, what I need is a dynamic subject where the page title is displayed automatically, without being setup manually

Sven Schatter _Lively Apps_
Atlassian Partner
January 20, 2020

Sorry, this wasn't clear to me from your question. This can be done with a simple user macro:

## @param Name:title=unused|type=string|desc=unused|hidden=true

<a href="mailto:no-one@snai1mai1.com?subject=$content.getTitle()">Contact Us</a>

Best regards,
Sven

Like # people like this
Nour Durra Nagarro
Contributor
January 20, 2020

this is perfect!! 

is there a possibility to display this as a button? or getting this macro as a URL to put it in a button? 

Am I asking too much? :D

Sven Schatter _Lively Apps_
Atlassian Partner
January 20, 2020

Sure. You have full control of the HTML, you can do whatever you want. ;)

## @param Name:title=Name|type=string|desc=Your name|hidden=true

<form action="mailto:no-one@snai1mai1.com?subject=$content.getTitle()">
<button class="aui-button aui-button-primary" type="submit">Contact Us</a>
</form>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events