Hi im creating a support ticket app that is a table with info from mysql db, that works good. Now i need to create an option to send email with the table data but email should have a predefined template with some variables like {{name etc, so if i select another record from table name should be different. So at the end info changes but design should stay the same
Create a new resource query, and select Retool Email as the resource.
For the To field, add a variable that represents the address you want to send a message to. For example, if you want it to be a selected record from the table, you could write {{ table1.selectedRow.email}}. Make sure to replace table1 and email with the name of your table and the name of the field that your email addresses are in.
You can do the same thing for the subject and description. For example, if you want to reference someone's name, you can write Thanks for your ticket, {{ table1.selectedRow.name }}. Again. make sure to replace table1 and name with actual values from your app.
Connect some kind of trigger to your new Retool Email query. In my example, I created a button, and set an event handler to call my new query whenever it is clicked.
i tried smtp method but the html is not working i got a table and a column named message where it have or contains a html code like (i use this option to be able to resend or send again email to X client)
Hm, that looks like valid HTML. Can you try something smaller to test out whether it's an issue with this specific HTML, or whether it's something else? For example: test_html.png
There aren't any restrictions agains using divs. Could you add {{tablaCorreos.selectedRow.cuerpo}} into an HTML component and see if it displays properly in your app, just to test out the HTML from your side?
If that's working, could you share the entire HTML snippet, and we'll try to help you troubleshoot from there?