• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

Registration Email Templates: Access to the application name?

Scheduled Pinned Locked Moved
Q&A
3
7
934
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    travis.whidden
    last edited by 5 Nov 2020, 22:08

    Hello,

    Working on our integration with FA - On the email templates, for template registration verification

    https://fusionauth.io/docs/v1/tech/email-templates/email-templates/#registration-verification

    There is a UserRegistration object, Tenant object and User object - but what about an Application object? In our email template, we would like to include what the application name is that the user is being invited to use.

    Second part of the question: Can we use these variables in the subject lines? This way we could create unique subjects per application? IE: You have been invited to use '<app.name>'

    We are using the verified flag on the registration to ensure a user opts into an application via email, even if they are granted access via admin interfaces.

    ~Travis

    1 Reply Last reply Reply Quote 0
    • D
      dan
      last edited by dan 11 Sept 2020, 05:17 9 Nov 2020, 05:17

      what about an Application object?

      That is not currently available. Because of the way the registration verification email is sent, I don't think there's any way to make this available at present.

      Options I can think of:

      • file a feature request: https://github.com/fusionauth/fusionauth-issues/issues
      • disable FusionAuth sending the registration email automatically. Instead, subscribe to a webhook which receives the registration created event, and then can call the API to send the registration verification email manually, with the Send Email API. That will allow you to populate arbitrary values in the requestData field, including the application name.

      I get that the second solution isn't optimal 🙂 but it may be a viable workaround. I'd encourage you to file an issue either way, as exposing the application object may be something the community values, and filing an issue will let them vote on it.

      Can we use these variables in the subject lines?

      Yup. Here's a post on customizing the subject lines (for a different email template, but it should be the same functionality):

      https://fusionauth.io/community/forum/topic/220/can-i-customize-the-passwordless-link-email-subject-with-the-time-the-link-expires

      Also, from https://fusionauth.io/docs/v1/tech/email-templates/email-templates/#registration-verification

      The email template body, subject and from name fields support replacement variables.

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • R
        robotdan
        last edited by 9 Nov 2020, 15:44

        Another option is to use an email template specific to the application so you can hard code the Application name. This works if you create the user and register them at the same time.

        1 Reply Last reply Reply Quote 1
        • R
          robotdan
          last edited by 9 Nov 2020, 16:22

          @travis-whidden opened this issue : https://github.com/FusionAuth/fusionauth-issues/issues/976

          1 Reply Last reply Reply Quote 1
          • T
            travis.whidden
            last edited by 12 Nov 2020, 02:06

            Sweet. Much appreciated. We were talking about making individual app templates, but that can get out of control especially for updates / changes. We do prefer to use one template for it --- across all the applications.

            I'll stay-tuned for that enhancement.

            Thanks!

            1 Reply Last reply Reply Quote 0
            • D
              dan
              last edited by 12 Nov 2020, 14:30

              @travis-whidden this functionality was released in 1.21.0: https://fusionauth.io/docs/v1/tech/release-notes/#version-1-21-0

              Please give it a whirl and provide feedback if it meets your needs (or doesn't).

              --
              FusionAuth - Auth for devs, built by devs.
              https://fusionauth.io

              1 Reply Last reply Reply Quote 1
              • T
                travis.whidden
                last edited by 13 Nov 2020, 16:55

                Works perfectly. Much appreciated!

                1 Reply Last reply Reply Quote 2
                6 out of 7
                • First post
                  6/7
                  Last post