getEmailTemplateContent()

in lambda/Message_Archiver/archiver/lib/pinpoint.js [207:222]


  getEmailTemplateContent(templateName) {
    if (!templateName) return [];
    return this.pinpoint.getEmailTemplate({
      TemplateName: templateName
    }).promise()
      .then((response) => {
        return response.EmailTemplateResponse;
      })
      .then((template) => {
        this.options.logger.log({
              level: 'info',
              message: JSON.stringify(template)
          });
        return this.getEmailContent(template);
      });
  }