Dynamic Email Text

I am developing an app which has too many emails to send. I was thinking is it possible for me to store the email text in DB and in the API just query it and send the email.

But the catch here is the text has to be dynamic. eg.
I store following in DB
Hi {{scUser.qData.user_name}},
{{mail_text}}

Thanks
{{Firm_name}}

and before sending the email, just query this and put it in the send email step. and I expect output to be

Hi Pranay,
Thanks for your email;

Thanks,
ABCD

is it possible?

Have you considered using an email service like sendgrid.com?

It's something I'd recommend if youve got a reasonable email workload.

Its got a decent template designer snd it does all the token merging into the templates for you.

Ans i believe theres a free tier. The API is easy to integrate

1 Like

Short answer: Yes, it's possible
Long answer: Search results for 'dynamic email' - Wappler Community

You can also trial out: Zepto Mail

They offer email templates, dynamic binding, bulk email sending, analytics and much more for £2 per 10,000 emails. I am using them for all of my email marketing and notifications, and haven't received any complains yet. You simply can't get anything cheaper for the service you get! :+1:

Edit: I also believed they used to give a credit (1) for new users, that totals to 10,000 emails, which is more than enough! Oh, and also, you can set your BIMI records there, too!

Yes, Wappler will try to parse all the bindings in the email body using the steps above the email steps.
So if you have Firm_name, mail_text etc available before the send email step, Wappler will parse the binding correctly.

Additionally, this also works if you keep your email template in an external HTML file, and use that file in the send email step.

That said, what others are suggesting is usually a better option if you have to send way too many emails - since using your own email account will probably blacklist your domain.