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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reapit-cdk.email-receiver-0.1.2.tar.gz.
File metadata
- Download URL: reapit-cdk.email-receiver-0.1.2.tar.gz
- Upload date:
- Size: 588.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad25f21c7e83d2b6e8a22f2fc3d97c59b2f74113239f83f2dd1f645be0b8895d
|
|
| MD5 |
f49dba89d2c0a94bb75656bce962cb7c
|
|
| BLAKE2b-256 |
7500865525eec1e331c00f824f87fd39df9979dae658bd2e78d5006b1e2bd0eb
|
File details
Details for the file reapit_cdk.email_receiver-0.1.2-py3-none-any.whl.
File metadata
- Download URL: reapit_cdk.email_receiver-0.1.2-py3-none-any.whl
- Upload date:
- Size: 587.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2064342b12b963cfc213bed0fb01fae0c87c9e5c2cc96bb54b0cf864edf38ba5
|
|
| MD5 |
0b17b0f8390caf5613d7a62642343c8b
|
|
| BLAKE2b-256 |
50ef14b3ab6a473496fccc8443924831fd10a51627f878136b22ce722a4a75e4
|