@types/nodemailer
Advanced tools
| /// <reference types="node" /> | ||
| import * as aws from "@aws-sdk/client-sesv2"; | ||
| import { EventEmitter } from "node:events"; | ||
@@ -15,4 +14,45 @@ | ||
| declare namespace SESTransport { | ||
| /** | ||
| * Minimal structural shape of SESv2 SendEmail input. | ||
| * This is intentionally structural so @types/nodemailer does not require | ||
| * installing @aws-sdk/client-sesv2. | ||
| * | ||
| * If you want the full, exact type, install @aws-sdk/client-sesv2 in your | ||
| * app and use its types directly in your own code. | ||
| */ | ||
| interface SendEmailRequestLike { | ||
| FromEmailAddress?: string; | ||
| Destination?: { | ||
| ToAddresses?: string[]; | ||
| CcAddresses?: string[]; | ||
| BccAddresses?: string[]; | ||
| }; | ||
| ReplyToAddresses?: string[]; | ||
| Content?: unknown; | ||
| EmailTags?: Array<{ Name?: string; Value?: string }>; | ||
| ConfigurationSetName?: string; | ||
| ListManagementOptions?: unknown; | ||
| FeedbackForwardingEmailAddress?: string; | ||
| // Allow extra fields without forcing the SDK type package | ||
| [key: string]: unknown; | ||
| } | ||
| /** Structural type matching SESv2Client from @aws-sdk/client-sesv2 */ | ||
| interface SESv2ClientLike { | ||
| send(command: unknown, options?: unknown): Promise<{ MessageId?: string }>; | ||
| config?: { | ||
| region?: string | (() => Promise<string>); | ||
| }; | ||
| } | ||
| /** | ||
| * Constructor type for SendEmailCommand from @aws-sdk/client-sesv2. | ||
| * The real type is: new(input: SendEmailCommandInput) => SendEmailCommand | ||
| * Contravariance prevents typing this more strictly without pulling in aws-sdk as a dependency. | ||
| */ | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| type SendEmailCommandConstructorLike = new(input: any) => unknown; | ||
| interface MailOptions extends Mail.Options { | ||
| /** list of keys that SendRawEmail method can take */ | ||
| /** Options passed to AWS SESv2 SendEmailCommand */ | ||
| ses?: MailSesOptions | undefined; | ||
@@ -23,9 +63,9 @@ } | ||
| // eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
| interface MailSesOptions extends Partial<aws.SendEmailRequest> {} | ||
| interface MailSesOptions extends Partial<SendEmailRequestLike> {} | ||
| interface Options extends MailOptions, TransportOptions { | ||
| /** is an option that expects an instantiated aws.SES object */ | ||
| /** An object containing an instantiated SESv2Client and the SendEmailCommand class */ | ||
| SES: { | ||
| sesClient: aws.SESv2Client; | ||
| SendEmailCommand: typeof aws.SendEmailCommand; | ||
| sesClient: SESv2ClientLike; | ||
| SendEmailCommand: SendEmailCommandConstructorLike; | ||
| }; | ||
@@ -35,3 +75,3 @@ } | ||
| interface SentMessageInfo { | ||
| /** an envelope object {from:‘address’, to:[‘address’]} */ | ||
| /** an envelope object {from:'address', to:['address']} */ | ||
| envelope: MimeNode.Envelope; | ||
@@ -38,0 +78,0 @@ /** the Message-ID header value. This value is derived from the response of SES API, so it differs from the Message-ID values used in logging. */ |
| { | ||
| "name": "@types/nodemailer", | ||
| "version": "7.0.8", | ||
| "version": "7.0.9", | ||
| "description": "TypeScript definitions for nodemailer", | ||
@@ -33,8 +33,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer", | ||
| "dependencies": { | ||
| "@aws-sdk/client-sesv2": "^3.839.0", | ||
| "@types/node": "*" | ||
| }, | ||
| "peerDependencies": {}, | ||
| "typesPublisherContentHash": "dd5813a6744e65d6be765df0b25470c4d5bbc9b2278b6a3e9fdd968767074de5", | ||
| "typesPublisherContentHash": "0c7c516d1e728b705f6215c22ebfa7c5610b559d79ce013534dc3ef127071c6d", | ||
| "typeScriptVersion": "5.2" | ||
| } | ||
| } |
@@ -11,6 +11,6 @@ # Installation | ||
| ### Additional Details | ||
| * Last updated: Sat, 10 Jan 2026 10:36:49 GMT | ||
| * Dependencies: [@aws-sdk/client-sesv2](https://npmjs.com/package/@aws-sdk/client-sesv2), [@types/node](https://npmjs.com/package/@types/node) | ||
| * Last updated: Mon, 26 Jan 2026 21:25:14 GMT | ||
| * Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
| # Credits | ||
| These definitions were written by [Rogier Schouten](https://github.com/rogierschouten), [Piotr Roszatycki](https://github.com/dex4er), and [Daniel Chao](https://github.com/bioball). |
86773
1.7%1
-50%1735
2.18%- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed