It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confluence 7.1.0 : mailto with an automatic subject

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

Hi @Nour Durra,

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

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

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 Nour Durra likes this

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

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
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

3,138 views 4 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you