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
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
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
File details
Details for the file cloudcomponents.cdk-responsive-email-template-2.3.0.tar.gz
.
File metadata
- Download URL: cloudcomponents.cdk-responsive-email-template-2.3.0.tar.gz
- Upload date:
- Size: 58.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fe4d459fdd23f71be0fbdc4cb4f4ab4130071b2d9a2361f64fc2d095e175ded |
|
MD5 | ae242a5d39fe5cb015aabe7219b8db18 |
|
BLAKE2b-256 | c656df201f6570694845144e6fe4626de7370d9eb873139f3196a296827550d9 |
File details
Details for the file cloudcomponents.cdk_responsive_email_template-2.3.0-py3-none-any.whl
.
File metadata
- Download URL: cloudcomponents.cdk_responsive_email_template-2.3.0-py3-none-any.whl
- Upload date:
- Size: 57.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91654ee79c165dfa877391580a3032a78b8611aa5fc1b23cae11fef248fc0745 |
|
MD5 | bb34751b0b7007cadc481acc666b3059 |
|
BLAKE2b-256 | dde7b816ec5a20e79dc5ae35bfc84e5592dcf73eb83b24ba13a6daf009c1ac66 |