Responsive email template for aws ses
Project description
@cloudcomponents/cdk-responsive-email-template
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
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for cloudcomponents.cdk-responsive-email-template-1.15.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4b708ee1ef749b6e12928c9401ac81ada6f92602943558b889ee0c5728765e9 |
|
MD5 | 0e2310c70d7d73e2b92c4b2ba644a91a |
|
BLAKE2b-256 | f403bc9d82adc9a4bac7585fecdc7d8ddfe955c75d0ba8a433322e21ea2c2a9d |
Close
Hashes for cloudcomponents.cdk_responsive_email_template-1.15.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28f95e15212577416489ee6473160bdb428f74073cb402812e0ae655e1239047 |
|
MD5 | 7be27fdbf8bdf4ed24e28640aee7e097 |
|
BLAKE2b-256 | e03a8d65347ce592fe7b8ea654e5ff9543849ec3bf86e781802a67f903aede81 |