Skip to main content
New Participant
July 24, 2025
Question

Contact Us Email within Site/Page

  • July 24, 2025
  • 4 replies
  • 22 views

I am extremely new to Appian and looking for some answers. I have searched the forums to no avail. I have created a Site with multiple pages in it, one of them being a Contact Us page. On the Contact Us page, I have been trying to apply the expression link: a!safelink in an attempt to generate emails using our default email server (Outlook) once a person clicks the "Company Team Email" verbiage. Is this something that Appian is capable of doing? 

This is my entire expression code:

a!headerContentLayout(

  header: {

    a!cardLayout(

      contents: {

        a!richTextDisplayField(

          labelPosition: "COLLAPSED",

          value: {

            a!richTextIcon(

              icon: "paw",

              color: "#255be3",

              size: "EXTRA_LARGE"

            )

          },

          align: "RIGHT"

        )

      },

      height: "AUTO",

      style: "#0f1632",

      marginBelow: "NONE",

      showBorder: false

    )

  },

  contents: {

    a!sideBySideLayout(

      items: {

        a!sideBySideItem(

          item: a!richTextDisplayField(

            labelPosition: "COLLAPSED",

            value: {

              a!richTextIcon(

                icon: "question-circle",

                color: "#255be3",

                size: "EXTRA_LARGE"

              )

            },

            align: "CENTER",

            marginAbove: "EVEN_MORE",

            marginBelow: "STANDARD"

          )

        )

      }

    ),

    a!richTextDisplayField(

      labelPosition: "COLLAPSED",

      value: {

        a!richTextItem(

          text: {

            "Questions, comments, concerns "

          },

          size: "LARGE"

        ),

        char(10),

        a!richTextItem(

          text: {

            "or to report an issue"

          },

          size: "LARGE"

        )

      },

      align: "CENTER",

      marginAbove: "MORE"

    ),

    a!richTextDisplayField(

      labelPosition: "COLLAPSED",

      value: {

        a!richTextItem(

          text: {

            "*Company Team Email"

          },

       link :

        a!safeLink(

          label: "emailaddress@company.com",

          uri: "mailto://emailaddress@company.com"

          color: "#255be3",

          size: "LARGE",

          style: {

            "STRONG"

          }

        )

      },

      tooltip: "Click here to send us an email",

      align: "CENTER"

    )

  }

)

4 replies

stefanhelzle0001
Brainy
July 24, 2025

This would make your code much more readable.

Now, what do you experience when clicking that link.

And, Appian can only display that link with a mailto-URL. When clicked, the browser will try to open the default email app on your computer.

And that URL should look like this: "mailto:name@bla.com"

New Participant
July 24, 2025

My apologies, also my first time posting in the Community section as well. Currently the entire page just goes blank as soon as I enter the link|safelink expression. The page just sort of grays out and doesn't populate anything.

So this portion should have the backslashes removed from it, correct? 

url: "mailto://emailaddress@company.com"



Here is the code again: 

a!headerContentLayout(
  header: {
    a!cardLayout(
      contents: {
        a!richTextDisplayField(
          labelPosition: "COLLAPSED",
          value: {
            a!richTextIcon(
              icon: "paw",
              color: "#255be3",
              size: "EXTRA_LARGE"
            )
          },
          align: "RIGHT"
        )
      },
      height: "AUTO",
      style: "#0f1632",
      marginBelow: "NONE",
      showBorder: false
    )
  },
  contents: {
    a!sideBySideLayout(
      items: {
        a!sideBySideItem(
          item: a!richTextDisplayField(
            labelPosition: "COLLAPSED",
            value: {
              a!richTextIcon(
                icon: "question-circle",
                color: "#255be3",
                size: "EXTRA_LARGE"
              )
            },
            align: "CENTER",
            marginAbove: "EVEN_MORE",
            marginBelow: "STANDARD"
          )
        )
      }
    ),
    a!richTextDisplayField(
      labelPosition: "COLLAPSED",
      value: {
        a!richTextItem(
          text: {
            "Questions, comments, concerns "
          },
          size: "LARGE"
        ),
        char(10),
        a!richTextItem(
          text: {
            "or to report an issue"
          },
          size: "LARGE"
        )
      },
      align: "CENTER",
      marginAbove: "MORE"
    ),
    a!richTextDisplayField(
      labelPosition: "COLLAPSED",
      value: {
        a!richTextItem(
          text: {
            "Company Team Address"
          },
        link : 
        a!safeLink(
          label: "emailaddress@company.com",
          url: "mailto://emailaddress@company.com"
          color: "#255be3",
          size: "LARGE",
          style: {
            "STRONG"
          }
        )
    )    
},
      tooltip: "Click here to send us an email",
      align: "CENTER"
    )
  }
)

stefanhelzle0001
Brainy
July 24, 2025

The parameter in the safelink is uri, not url.

Try this code:

a!linkField(
  links: a!safeLink(
    label: "test@test.com",
    uri: "mailto:test@test.com"
  )
)

shubhama926776
Brainy
July 25, 2025

You're using mailto:// instead of mailto: and url: instead of uri: in a!safeLink, plus missing commas and parentheses. 
Made changes to your code have a look at it..

a!headerContentLayout(
  header: {
    a!cardLayout(
      contents: {
        a!richTextDisplayField(
          labelPosition: "COLLAPSED",
          value: {
            a!richTextIcon(
              icon: "paw",
              color: "#255be3",
              size: "EXTRA_LARGE"
            )
          },
          align: "RIGHT"
        )
      },
      height: "AUTO",
      style: "#0f1632",
      marginBelow: "NONE",
      showBorder: false
    )
  },
  contents: {
    a!sideBySideLayout(
      items: {
        a!sideBySideItem(
          item: a!richTextDisplayField(
            labelPosition: "COLLAPSED",
            value: {
              a!richTextIcon(
                icon: "question-circle",
                color: "#255be3",
                size: "EXTRA_LARGE"
              )
            },
            align: "CENTER",
            marginAbove: "EVEN_MORE",
            marginBelow: "STANDARD"
          )
        )
      }
    ),
    a!richTextDisplayField(
      labelPosition: "COLLAPSED",
      value: {
        a!richTextItem(
          text: {
            "Questions, comments, concerns "
          },
          size: "LARGE"
        ),
        char(10),
        a!richTextItem(
          text: {
            "or to report an issue"
          },
          size: "LARGE"
        )
      },
      align: "CENTER",
      marginAbove: "MORE"
    ),
    a!richTextDisplayField(
      labelPosition: "COLLAPSED",
      value: {
        a!richTextItem(
          text:"Company Team Address",
          link : a!safeLink(
            label: "emailaddress@company.com",
            uri: "mailto://emailaddress@company.com"
            ),
           color: "#255be3",
           size: "LARGE",
           style:"STRONG"
            
          )
      },
      tooltip: "Click here to send us an email",
      align: "CENTER"
    )
  }
)

शुभम्