Sending an email with template still uses the email API, so you would still need to add your mail server configuration.
Thanks @mark-piller . I tried with mail server and its working.
But i have to send {app_name} and {confirmation_url} in email.
How can i access this in event handler’s send-email block.
Hello @Swapnil_G
- Create Codeless service with a method that will activate the user:
- Place a link to this method in the afterRegister event handler in the block with the text of the email to be sent to the administrator. Use objectId instead of smart text {userId}
When the user registers, the admin will receive an email with a link to activate the user
Regards,
Inna
Thanks @Inna_Shkolnaya. It’s working and got confirmation_url in mail.
right now on confirmation link click its just showing ‘null’ text on page
i have to show confirmation (default system confirmation) page on click of email link like below
How can redirect to page created in frontend UI builder?
Hi @Swapnil_G ,
To redirect to the confirmation page build by UI Builder you should explicitly specify link for that page in your email.
right now on confirmation link click its just showing ‘null’ text on page
What link do you receive in email?
Regards, Andriy
Hello @Swapnil_G
I recommend for your method “activateUser” (as in my screenshot above) which will activate the user for return to insert the link to the page you want. This way, once the admin clicks the link and confirms the user, they will be redirected to the page you specified in the method.
Regards,
Inna
Yes @Inna_Shkolnaya.
May i know where can i found confirmation page link created by backendless UI-builder?
I tried to return link for testing but it’s just get displayed on email verification link click. Its should redirect like backendless default confirmation flow.
Hi @Swapnil_G,
find the page you want in the UI Builder and select it (if you want the default confirmation page, it’s allocated under the system
container), then click on the Open Published App
icon in the top-rigth corner (see the red arrow pointing this). The page will be opened in the new browser tab, there you can copy the URL of the page and use it in your email.
Regards,
Stanislaw
Thanks @stanislaw.grin
I have added confirmation page url to return in activeUser api logic block.
But it’s just show page with string url when email link get click.
How can i redirect to that page link directly when user clicks email confirmation link?
Thanks in advance!
Hello @Swapnil_G
Could you show us how you use this API service? I see that it returns a string, but how would you like to use it later?
This topic can be useful for you:
Regards,
Marina
Hello @Marina.Kan
on new user sign up admin will receive email to verify user.
so created an API service that has a method that will activate the user and send him a message about successful registration or verification by admin.
Every thing is working fine. But when admin clicks confirmation link from email, it open new tab with blank page, instead of this i have to show/redirect to backendless system confirmation-page (it’s in ui builder).
To achive this i have returned confirmation-page url from api-service (can find screenshot in last reply).
@Swapnil_G, thank you for the description. We are looking for a solution. We will contact you as soon as we have the results.
Regards,
Marina
Thanks @Marina.Kan for responding and efforts.
Please post the solution once you get some work arround
@Swapnil_G, you need to add the next logic to the API Service:
Make sure that the value in the Response Headers should be the full path to the confirmation-confirmed page, like: https://xxxx.backendless.app/api/files/ui-builder/containers/system/index.html?page=confirmation-confirmed
Regards,
Marina
HI @Inna_Shkolnaya ,
I need a help
How can i show text like ‘Click here to Confirm’ in email confirmation instead of showing raw url to in mail.
like Click to confirm
Hello @Swapnil_G
For this task you need to create a custom Email Template where you specify variable for the link (see Confirmation Template as an example). Then in your event handler you will need to send your created template to the admin, and pass the link that is already being generated as template values. Monosnap
Regards,
Inna
Thanks @Inna_Shkolnaya.
Im using event handler to send email PFA as below. (using send email instead of email template)
Could you please help me out, to create a ‘variable for the link’ which will have a href as like shown in above attachment.
Hello @Swapnil_G
If you don’t want to use email template you can do it with HTML text.
Something like
Better with function
Result
For a more complex email structure, you need knowledge of the HTML. Or you can find an email editor that will return the HTML for you.
Regards