hi im trying to send html from a db via sendgrid but its not parsing correctly see:
what im doing wrong?
thank you
hi im trying to send html from a db via sendgrid but its not parsing correctly see:
what im doing wrong?
thank you
Hey @agaitan026,
What error do you get when you hover over your tablaCorres.selectedRow.cuerpo variable? Have you tried without the double quotes?
error: Unable to access 'tablaCorreos' since it is scoped to 'EditarUsuario'. 'undefined' is scoped to the app.
im using multi page app, not sure if that is the issue
Hey @agaitan026!
Quick clarifying question - is the content of the email correct and it's just not displaying correctly? Or is tablaCorreos.selectedRow.cuerpo
not evaluating to the correct value? I'm thinking it's the former but let me know if that assumption is incorrect.
My first recommendation is to look into using Dynamic Templates. This allows you to define the HTML structure of your email body within SendGrid and then populate it with wildcard variables that are sent from Retool. This almost guarantees compatibility and correct formatting, given it's native to SendGrid.
That said, your implementation should work for relatively simple HTML, which means that you're probably running into some of the inherent limitations. Can you test with a simpler HTML body?
Given that you're also running into issues here, the other possibility is that there's something wacky with the way the HTML is being stored, retrieved, and parsed. Can you verify that hard-coding the HTML works as expected?