# UserPoolSESOptions

Configuration for Cognito sending emails via Amazon SES.

Used as argument in: [UserPoolEmail.withSES](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolEmail.html#withses)

- Source: [`aws-cognito/lib/user-pool-email.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cognito/lib/user-pool-email.ts#L10)
- Type last changed: v2.22.0 · 28 Apr 2022

## Example

TypeScript:

```ts
new cognito.UserPool(this, 'myuserpool', {
  email: cognito.UserPoolEmail.withSES({
    fromEmail: 'noreply@myawesomeapp.com',
    fromName: 'Awesome App',
    replyTo: 'support@myawesomeapp.com',
  }),
});
```

Python:

```python
cognito.UserPool(self, "myuserpool",
    email=cognito.UserPoolEmail.with_ses(
        from_email="noreply@myawesomeapp.com",
        from_name="Awesome App",
        reply_to="support@myawesomeapp.com"
    )
)
```

Java:

```java
UserPool.Builder.create(this, "myuserpool")
        .email(UserPoolEmail.withSES(UserPoolSESOptions.builder()
                .fromEmail("noreply@myawesomeapp.com")
                .fromName("Awesome App")
                .replyTo("support@myawesomeapp.com")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
new UserPool(this, "myuserpool", new UserPoolProps {
    Email = UserPoolEmail.WithSES(new UserPoolSESOptions {
        FromEmail = "noreply@myawesomeapp.com",
        FromName = "Awesome App",
        ReplyTo = "support@myawesomeapp.com"
    })
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
cognito.NewUserPool(this, jsii.String("myuserpool"), &UserPoolProps{
	Email: cognito.UserPoolEmail_WithSES(&UserPoolSESOptions{
		FromEmail: jsii.String("noreply@myawesomeapp.com"),
		FromName: jsii.String("Awesome App"),
		ReplyTo: jsii.String("support@myawesomeapp.com"),
	}),
})
```

## Properties

- `configurationSetName`: string — The name of a configuration set in Amazon SES that should be applied to emails sent via Cognito.

  **Default:** no configuration set

- `fromEmail`: string (required) — The verified Amazon SES email address that Cognito should use to send emails.

  The email address used must be a verified email address
  in Amazon SES and must be configured to allow Cognito to
  send emails.

- `fromName`: string — An optional name that should be used as the sender's name along with the email.

  **Default:** no name

- `replyTo`: string — The destination to which the receiver of the email should reply to.

  **Default:** same as the fromEmail

- `sesRegion`: string — Required if the UserPool region is different than the SES region.

  **Default:** The same region as the Cognito UserPool

  If sending emails with a Amazon SES verified email address,
  and the region that SES is configured is different than the
  region in which the UserPool is deployed, you must specify that
  region here.

- `sesVerifiedDomain`: string — SES Verified custom domain to be used to verify the identity.

  **Default:** no domain
