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.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4db606bdedc2e6b484e1e49d4614245d1fe1b03d5093e080432cc7c51272604e |
|
MD5 | 45fee13f871985031068b908ab119e62 |
|
BLAKE2b-256 | e1a638baa0305c3205ebc2ac57daaa2bd1bd687130d5bf33349ad5189ea71c9b |
Close
Hashes for cloudcomponents.cdk_responsive_email_template-1.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bbcbe845b2888e7dbf6448e1fadf10d1f6b62d49a2ab410553b5d002f1213c1 |
|
MD5 | f8daeb8f2e50f9d38949e06c581a45f8 |
|
BLAKE2b-256 | d166519a102faca751f06cd97548340497196336544a0898168e1343e6f543ae |