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

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.core import Construct, Stack, StackProps
from cloudcomponents.cdk_responsive_email_template import ResponsiveEmailTemplate, TemplatePart

class ResponsiveEmailTemplateStack(Stack):
    def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):
        super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)

        ResponsiveEmailTemplate(self, "EmailTemplate",
            template_name="demo",
            subject_part="cloudcomponents - {{ title }}",
            text_part=TemplatePart.from_inline("text message"),
            html_part=TemplatePart.from_inline("""<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>"""),
            parsing_options=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

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