I'm creating a message for an email to send using MailApp. The gscript looks like this:
function emailIT(newEmp)
{
var templ = HtmlService.createTemplateFromFile('ITEmailHtml')
templ.newEmp = newEmp;
var message = templ.evaluate().getContent();
The script crashes on the last line. newEmp is a dictionary with a key:value pair responseUrl: "https://docs.google.com/forms/d/e/1FAIpQL...".
The html template file looks like:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
A new employee onboarding request has been submitted for <?= newEmp.empName ?>.
Please onboard this new employee and update the request <a href="<?= newEmp.responseUrl ?>">here</a>.
The relevant information for this employee is listed below: <br><br>
...
I've tried changing the scriptlets to force print tags, , with the same result. If I get rid of the href part, all of my other print tags work fine.
Thanks in advance for any help
This works for me:
GS:
html:
Logger Output:
9:26:22 PM Notice Execution started 9:26:20 PM Info