A follow up from this post.
What’s not working:
HTML email with template file
{"status":"500","message":"html.replace is not a function","stack":"TypeError: html.replace is not a function\n...
Static HTML email, triggered from Schedule
(node:18768) UnhandledPromiseRejectionWarning: TypeError: this.req.get is not a function...
Both Static HTML and HTML email with template file, triggered from Schedule
What’s working so far…:
Text Email (not HTML) every time (both from API and Schedule)
Static HTML email triggered from API step (not Schedule)
Tested on Wappler 3.7.7.
2 Likes
patrick
February 19, 2021, 12:14pm
3
I made part of the code conditional for when run from schedule. When running from schedule we don’t have a request and I can’t retrieve the server address from the request to fix relative paths in the html. So when using html mails with the scheduler you have to make sure to use full urls in your mail template.
Here the updated file, unzip it in lib/modules
.
mail.zip (1.3 KB)
1 Like
I’ve updated the file. Still get error.
(node:5144) UnhandledPromiseRejectionWarning: TypeError: this.req.get is not a function
patrick
February 19, 2021, 12:43pm
5
I see the check should be a bit stricter since we have some dummy req object.
mail.zip (1.3 KB)
1 Like
Static HTML - Sent
HTML with Template - Sent but data bindings didn’t render data e.g. got this {{output_confiq.org}}
in the email
Update: also get this error if Embed image option is ticked:
(node:7292) UnhandledPromiseRejectionWarning: TypeError: html.replace is not a function
Teodor
Closed
February 22, 2021, 4:00pm
12
This topic was automatically closed after 2 days. New replies are no longer allowed.