Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    Client Area Confirmation Mail

    General Discussion
    2
    8
    1059
    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.
    • Dick Honing
      Dick Honing last edited by

      Does anybody happen to know where I can find an example and/or instructions to create a confirmation mail after a new user creates an account? Preferably with a link to activate the account. Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • Wassim
        Wassim last edited by

        Hi,

        You can use the template to send an email in AppDrag CloudBackend functions and include this logic inside :

        • Create the user in DB with a unique verification token string and a boolean column "verified user" to false (0) by default
        • In your email content send a link with the verification token as a parameter to a page "verifyAccount.html"

        And on your "verifyAccount.html" page you can

        • Check if the token is here and perform a call to your API to verify the user
        • Based on the return from your API redirect the user to your project dashboard with an url parameter "?userverified=true" or if there was an issue display an error message

        Wish it helps you, don't hesitate if you have questions on any steps.

        Dick Honing 1 Reply Last reply Reply Quote 1
        • Dick Honing
          Dick Honing last edited by

          @Wassim thanks! I'm going to try this. Perhaps you can also check your tutorial 4 ... https://academy.appdrag.com/FullStack-with-cloud-backend-Episode-4.html

          Half way, it shows this screenshot, which is confusion as the tutorial is on forget password and there'e no explanation on how to create a account creation verification system/mail ...

          1 Reply Last reply Reply Quote 0
          • Dick Honing
            Dick Honing last edited by

            @Wassim ... the screenshot ...
            1539181116176-ep4.2.JPG

            1 Reply Last reply Reply Quote 0
            • Dick Honing
              Dick Honing @Wassim last edited by

              @Wassim I managed to create and send the mail with the verification code and got the api to validate the account working. Now I'm stuck on the verifyAccount.html. I suspect there's some (JavaScript) code required to get the token, perform the call, proces the return and move the user to the right page. Do you have some sample on this or point me in the right direction? Thanks again and best regards - Dick

              said in Client Area Confirmation Mail:

              Hi,
              You can use the template to send an email in AppDrag CloudBackend functions and include this logic inside :

              Create the user in DB with a unique verification token string and a boolean column "verified user" to false (0) by default
              In your email content send a link with the verification token as a parameter to a page "verifyAccount.html"

              And on your "verifyAccount.html" page you can

              Check if the token is here and perform a call to your API to verify the user
              Based on the return from your API redirect the user to your project dashboard with an url parameter "?userverified=true" or if there was an issue display an error message

              Wish it helps you, don't hesitate if you have questions on any steps.

              1 Reply Last reply Reply Quote 0
              • Dick Honing
                Dick Honing last edited by

                @Wassim I've already got it ... that the 'addEventListener('JqueryLoaded', function(e) {' etc. code 🙂

                1 Reply Last reply Reply Quote 0
                • Dick Honing
                  Dick Honing last edited by

                  @Wassim I've got it to work 🙂 ... also added some additional logic at login to check whether the user has already verified his/her account ...

                  1 Reply Last reply Reply Quote 0
                  • Wassim
                    Wassim last edited by

                    Hi, nice that you successfully made it. Don't hesitate if you have further questions or questions about your current implementation.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post