Error: Template.replace Not a Function


Hello Everyone,
Please forgive me, as I am brand new to Retool.

I am attempting to attempting to upload a file, and send that file via SMTP. I have created a form with a submit button that triggers a query to send an SMTP email.

The issue is when I attempt to add an attachment, I am getting an error stating that template.replace is not a function. I am able to send emails without attachments. Any advice is appreciated!

@nmudgett can you share more info screenshot of what you’re replacing and maybe you do not need to replace it at all.

@ScottR thats just it. I’m actually not replacing anything. I don’t call that function whatsoever. The only time I get an error is when I chose the file uploader in the attachment section on the SMTP Query.

There is a known bug with SMTP attachments. Use the FX format in the solution of this thread: