This construct sets up everything necessary to receive email. The emails get stored in a dynamodb table, queryable by recipient. This is designed to be used in end-to-end tests, with the [@reapit-cdk/email-receiver-client](../../libs/email-receiver-client) helper library.
Project description
@reapit-cdk/email-receiver
This construct sets up everything necessary to receive email. The emails get stored in a dynamodb table, queryable by recipient. This is designed to be used in end-to-end tests, with the @reapit-cdk/email-receiver-client helper library.
Package Installation:
yarn add --dev @reapit-cdk/email-receiver
# or
npm install @reapit-cdk/email-receiver --save-dev
Usage
import { CfnOutput, Stack, App } from 'aws-cdk-lib'
import { HostedZone } from 'aws-cdk-lib/aws-route53'
import { EmailReceiver } from '@reapit-cdk/email-receiver'
const app = new App()
const stack = new Stack(app, 'stack-name', {
env: {
region: 'us-east-1', // region must be specified
},
})
const hostedZone = new HostedZone(stack, 'hostedZone', {
zoneName: 'example.org',
})
const emailReceiver = new EmailReceiver(stack, 'domain', {
hostedZone,
// you can optionally override the parent domain
// (e.g. your hosted zone is example.org but you want to use dev.example.org)
// parentDomain: '',
// you can optionally override the subdomain
// this defaults to 'email' so the resulting domain will be email.example.org
// subdomain: '',
})
new CfnOutput(stack, 'emailReceiverDomainName', {
value: emailReceiver.domainName,
})
new CfnOutput(stack, 'emailReceiverTableArn', {
value: emailReceiver.table.tableArn,
})
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 reapit-cdk.email-receiver-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c82e0eb8e72e92d875030a6ede0b9ea82b04646c1cdb6d685cd2ad03918ae3a |
|
MD5 | b42b0080c9102314662ff29b6002ed00 |
|
BLAKE2b-256 | 75ae1c5ec40ad1370c95d2ac6a6b6aca3d81dbc8728a56d100913ef50e650128 |
Close
Hashes for reapit_cdk.email_receiver-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc173d160d60ca70153f11d15acb69c48c2dadbd350bfd3fe664d57cc6f0f394 |
|
MD5 | 3126803f68f4b749fb398cd86de09948 |
|
BLAKE2b-256 | 4eaa2f4c2464904f30376a8efb2120c023dd2a01f13e4f339a7a640197ce9f1e |