Skip to main content

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

npm version npm downloads coverage: 99.02%25 Integ Tests: ✔

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reapit-cdk.email-receiver-0.1.2.tar.gz (588.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reapit_cdk.email_receiver-0.1.2-py3-none-any.whl (587.4 kB view details)

Uploaded Python 3

File details

Details for the file reapit-cdk.email-receiver-0.1.2.tar.gz.

File metadata

File hashes

Hashes for reapit-cdk.email-receiver-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ad25f21c7e83d2b6e8a22f2fc3d97c59b2f74113239f83f2dd1f645be0b8895d
MD5 f49dba89d2c0a94bb75656bce962cb7c
BLAKE2b-256 7500865525eec1e331c00f824f87fd39df9979dae658bd2e78d5006b1e2bd0eb

See more details on using hashes here.

File details

Details for the file reapit_cdk.email_receiver-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for reapit_cdk.email_receiver-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2064342b12b963cfc213bed0fb01fae0c87c9e5c2cc96bb54b0cf864edf38ba5
MD5 0b17b0f8390caf5613d7a62642343c8b
BLAKE2b-256 50ef14b3ab6a473496fccc8443924831fd10a51627f878136b22ce722a4a75e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page