I am using AWS SES to send emails by following the doc https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html. The HTML part in the sample template is too short, but I need a long HTML part with multiple lines. For example, it has several lines as the following:
{
"Template": {
"TemplateName": "Group_Invitation",
"SubjectPart": "{{who}} has invited you to join team {{group_name}}",
"TextPart": "",
"HtmlPart": ["<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>{{name}}</body>
</html>"]
}
}
I cannot upload this template. It will show errors
Error parsing parameter 'cli-input-json': Invalid JSON: Invalid control character at: line 6 column 32 (char 182)
JSON received: {
"Template": {
"TemplateName": "Group_Invitation",
"SubjectPart": "{{who}} has invited you to join team {{group_name}}",
"TextPart": "",
"HtmlPart": ["<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>{{name}}</body>
</html>"]
}
}
I am not sure how I can handle the htmlpart with multiple lines.
\"
and then use http://minifycode.com/html-minifier/ to, well, minify – Sadye