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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c321fb933e002113aac3ca671033c4870afbd7f54ab95ffdb228354be7e2444 |
|
MD5 | 4185a6a1a62dea0698b3fbe0f20cdb10 |
|
BLAKE2b-256 | 6c865a1fe9029ca970550755bc83bef2a93f138ba855018011e5af6cc9357feb |
Close
Hashes for cloudcomponents.cdk_responsive_email_template-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5484c17325fcacf70e028a6e3f316fe2d41746614f3f824e1832615e2fe68f6 |
|
MD5 | 8fe3fdd9e05144d27498a494a78e1965 |
|
BLAKE2b-256 | 6aac32b79dd7fd409afc3a17a1995b62baeaa9a55029532efcb8544eef7ea7d0 |