I want emails that are send using adaptavist mail forms to have the "FROM" Field populated by the logged in user.  This means that the reciepient who receives the email will see the email  as coming from the user who was logged in to Confluence when the form was sent.  How do I do this?

1 answer

This widget could not be displayed.

Hi @Joe Boothby,

 

Hope this finds you well. Please let me know the version of Confluence and the version of the plugin you are using.

In order to capture the email id of the user who submits the form without having them input it, you can follow the steps given below. 

1. Insert mail-input macro in the form you are creating.
2. Fill the required fields.
3. Give the Velocity value as $!user.email and save the macro.

You can also change the type of the mail-input macro to hidden if you do not wish the user to see this field.

This will automatically fill the email id of the user in the body of the email but not in the "FROM" field of the email

If you wish to have the email address of the sender in the "FROM" field of the email, we have not designed the plugin to have the FROM field filled with the users email address due to security reasons.  However, there is one workaround to have the email address populated in the from field but it may not be the same as you expected. You will be able to see the email address of the user as well as the email address configured in the Admin section - Mail Server Configuration. Assuming that you are using Form Mail v4.3.2, I have created an example of the above. Please see below for the Storage format. You can apply the storage format on a test page using Source Editor (free) plugin in order to see the example I created.


Storage Format :


<ac:structured-macro ac:macro-id="4c39d36c-e594-4426-b7de-abec11f6a825" ac:name="mail-form" ac:schema-version="1"><ac:parameter ac:name="subject">subject</ac:parameter><ac:parameter ac:name="generatedUUID">ccc272fc-e607-4f6f-bf0a-1a3d9b7fd025</ac:parameter><ac:parameter ac:name="destination">test@email.com</ac:parameter><ac:rich-text-body>
<p><ac:structured-macro ac:macro-id="c3186c30-8d98-43dc-9cbb-ef93a494e892" ac:name="mail-input" ac:schema-version="1"><ac:parameter ac:name="vtlValue">$!user.email</ac:parameter><ac:parameter ac:name="name">fromName</ac:parameter><ac:parameter ac:name="type">hidden</ac:parameter></ac:structured-macro></p>
<p><ac:structured-macro ac:macro-id="3edee4ba-f33d-4452-9002-ea4f21152bb4" ac:name="mail-date-picker" ac:schema-version="1"><ac:parameter ac:name="labelText">date</ac:parameter><ac:parameter ac:name="format">dd/mm/yyyy</ac:parameter><ac:parameter ac:name="name">date</ac:parameter></ac:structured-macro></p><ac:structured-macro ac:macro-id="47ab8d03-2dd5-4a93-b0d4-12e932be5d67" ac:name="mail-submit" ac:schema-version="1" />
<p>&nbsp;</p></ac:rich-text-body></ac:structured-macro>

 


Hope this information was helpful. Should you have any queries please do not hesitate to let us know.


Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Jul 30, 2018 in Confluence

How Manon Soubies-Camy uses Confluence + Trello to organize webinar notes and her knitting stash

@Manon Soubies-Camy is an engineer who has been an avid Atlassian user since 2014. She helps companies of all sizes transform the way they work with the Atlassian stack, including Jira and Confl...

847 views 8 13
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you