The large transactional email sending services (sendgrid, mailgun, postmark, ...) support email templates, e.g.
https://sendgrid.com/docs/User_Guide/Transactional_Templates... and some have online editors. Then in your code you call an API method with placeholders.
https://postmarkapp.com/developer/api/templates-api