Skip to content
v2.278.0

EmailIdentityProps Struct ​

Properties for an email identity.

Example ​

ts
import * as iam from 'aws-cdk-lib/aws-iam';
declare const user: iam.User;

const identity = new ses.EmailIdentity(this, 'Identity', {
  identity: ses.Identity.domain('cdk.dev'),
});

identity.grantSendEmail(user);
python
import aws_cdk.aws_iam as iam
# user: iam.User


identity = ses.EmailIdentity(self, "Identity",
    identity=ses.Identity.domain("cdk.dev")
)

identity.grant_send_email(user)
java
import software.amazon.awscdk.services.iam.*;
User user;


EmailIdentity identity = EmailIdentity.Builder.create(this, "Identity")
        .identity(Identity.domain("cdk.dev"))
        .build();

identity.grantSendEmail(user);
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.IAM;
User user;


var identity = new EmailIdentity(this, "Identity", new EmailIdentityProps {
    Identity = Identity.Domain("cdk.dev")
});

identity.GrantSendEmail(user);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import iam "github.com/aws/aws-cdk-go/awscdk"
var user User


identity := ses.NewEmailIdentity(this, jsii.String("Identity"), &EmailIdentityProps{
	Identity: ses.Identity_Domain(jsii.String("cdk.dev")),
})

identity.grantSendEmail(user)

Properties ​

configurationSetoptionalIConfigurationSetRefconfiguration_setoptionalIConfigurationSetRefconfigurationSetoptionalIConfigurationSetRefConfigurationSetoptionalIConfigurationSetRefConfigurationSetoptionalIConfigurationSetRef #
The configuration set to associate with the email identity.

Default: do not use a specific configuration set

dkimIdentityoptionalDkimIdentitydkim_identityoptionalDkimIdentitydkimIdentityoptionalDkimIdentityDkimIdentityoptionalDkimIdentityDkimIdentityoptionalDkimIdentity #
The type of DKIM identity to use.

Default: Easy DKIM with a key length of 2048-bit

dkimSigningoptionalbooleandkim_signingoptionalbooldkimSigningoptionalBooleanDkimSigningoptionalboolDkimSigningoptional*bool = true #
Whether the messages that are sent from the identity are signed using DKIM.
feedbackForwardingoptionalbooleanfeedback_forwardingoptionalboolfeedbackForwardingoptionalBooleanFeedbackForwardingoptionalboolFeedbackForwardingoptional*bool = true #
Whether to receive email notifications when bounce or complaint events occur.
notes

These notifications are sent to the address that you specified in the Return-Path header of the original email.

You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).

identityIdentityidentityIdentityidentityIdentityIdentityIdentityIdentityIdentity required #
The email address or domain to verify.
mailFromBehaviorOnMxFailureoptionalMailFromBehaviorOnMxFailuremail_from_behavior_on_mx_failureoptionalMailFromBehaviorOnMxFailuremailFromBehaviorOnMxFailureoptionalMailFromBehaviorOnMxFailureMailFromBehaviorOnMxFailureoptionalMailFromBehaviorOnMxFailureMailFromBehaviorOnMxFailureoptionalMailFromBehaviorOnMxFailure #
The action to take if the required MX record for the MAIL FROM domain isn't found when you send an email.

Default: MailFromBehaviorOnMxFailure.USE_DEFAULT_VALUE

mailFromDomainoptionalstringmail_from_domainoptionalstrmailFromDomainoptionalStringMailFromDomainoptionalstringMailFromDomainoptional*string #
The custom MAIL FROM domain that you want the verified identity to use.

Default: use amazonses.com

notes

The MAIL FROM domain must meet the following criteria:

  • It has to be a subdomain of the verified identity
  • It can't be used to receive email
  • It can't be used in a "From" address if the MAIL FROM domain is a destination for feedback forwarding emails