Skip to main content

Responsive email template for aws ses

Project description

cloudcomponents Logo

@cloudcomponents/cdk-responsive-email-template

Build Status cdkdx typescript python

Responsive mjml email template for aws ses

Install

TypeScript/JavaScript:

npm i @cloudcomponents/cdk-responsive-email-template

Python:

pip install cloudcomponents.cdk-responsive-email-template

How to use

import { ResponsiveEmailTemplate, TemplatePart } from '@cloudcomponents/cdk-responsive-email-template';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';

export class ResponsiveEmailTemplateStack extends Stack {
  constructor(scope: Construct, id: string, props: StackProps) {
    super(scope, id, props);

    new ResponsiveEmailTemplate(this, 'EmailTemplate', {
      templateName: 'demo',
      subjectPart: 'cloudcomponents - {{ title }}',
      textPart: TemplatePart.fromInline('text message'),
      htmlPart: TemplatePart.fromInline(`<mjml>
    <mj-head>
      <mj-title>cloudcomponents - {{ title }}</mj-title>
    </mj-head>
    <mj-body>
      <mj-section>
        <mj-column>
          <mj-text>
            Hello {{ name }}!
          </mj-text>
        </mj-column>
      </mj-section>
    </mj-body>
  </mjml>`),
      parsingOptions: {
        beautify: true,
      },
    });
  }
}

API Reference

See API.md.

Example

See more complete examples.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file cloudcomponents.cdk-responsive-email-template-2.3.0.tar.gz.

File metadata

File hashes

Hashes for cloudcomponents.cdk-responsive-email-template-2.3.0.tar.gz
Algorithm Hash digest
SHA256 0fe4d459fdd23f71be0fbdc4cb4f4ab4130071b2d9a2361f64fc2d095e175ded
MD5 ae242a5d39fe5cb015aabe7219b8db18
BLAKE2b-256 c656df201f6570694845144e6fe4626de7370d9eb873139f3196a296827550d9

See more details on using hashes here.

File details

Details for the file cloudcomponents.cdk_responsive_email_template-2.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudcomponents.cdk_responsive_email_template-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91654ee79c165dfa877391580a3032a78b8611aa5fc1b23cae11fef248fc0745
MD5 bb34751b0b7007cadc481acc666b3059
BLAKE2b-256 dde7b816ec5a20e79dc5ae35bfc84e5592dcf73eb83b24ba13a6daf009c1ac66

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page