@types/nodemailer 6.2.1 → 6.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
nodemailer/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
nodemailer/README.md CHANGED
@@ -5,12 +5,12 @@
5
5
  This package contains type definitions for Nodemailer (https://github.com/nodemailer/nodemailer).
6
6
 
7
7
  # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer.
9
9
 
10
- Additional Details
11
- * Last updated: Mon, 22 Jul 2019 19:52:31 GMT
12
- * Dependencies: @types/node
10
+ ### Additional Details
11
+ * Last updated: Mon, 24 May 2021 12:32:37 GMT
12
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
13
13
  * Global values: none
14
14
 
15
15
  # Credits
16
- These definitions were written by Rogier Schouten <https://github.com/rogierschouten>, Piotr Roszatycki <https://github.com/dex4er>, and Daniel Chao <https://github.com/bioball>.
16
+ These definitions were written by [Rogier Schouten](https://github.com/rogierschouten), [Piotr Roszatycki](https://github.com/dex4er), and [Daniel Chao](https://github.com/bioball).
nodemailer/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for Nodemailer 6.2
1
+ // Type definitions for Nodemailer 6.4
2
2
  // Project: https://github.com/nodemailer/nodemailer, https://nodemailer.com
3
3
  // Definitions by: Rogier Schouten <https://github.com/rogierschouten>
4
4
  // Piotr Roszatycki <https://github.com/dex4er>
@@ -19,17 +19,17 @@ import StreamTransport = require('./lib/stream-transport');
19
19
 
20
20
  export type SendMailOptions = Mail.Options;
21
21
 
22
- export type SentMessageInfo = any;
22
+ export type Transporter<T = any> = Mail<T>;
23
23
 
24
- export type Transporter = Mail;
24
+ export type SentMessageInfo = any;
25
25
 
26
- export interface Transport {
27
- mailer?: Mail;
26
+ export interface Transport<T = any> {
27
+ mailer?: Transporter<T>;
28
28
 
29
29
  name: string;
30
30
  version: string;
31
31
 
32
- send(mail: MailMessage, callback: (err: Error | null, info: SentMessageInfo) => void): void;
32
+ send(mail: MailMessage<T>, callback: (err: Error | null, info: T) => void): void;
33
33
 
34
34
  verify?(callback: (err: Error | null, success: true) => void): void;
35
35
  verify?(): Promise<true>;
@@ -44,21 +44,39 @@ export interface TransportOptions {
44
44
  export interface TestAccount {
45
45
  user: string;
46
46
  pass: string;
47
- smtp: { host: string, port: number, secure: boolean };
48
- imap: { host: string, port: number, secure: boolean };
49
- pop3: { host: string, port: number, secure: boolean };
47
+ smtp: { host: string; port: number; secure: boolean };
48
+ imap: { host: string; port: number; secure: boolean };
49
+ pop3: { host: string; port: number; secure: boolean };
50
50
  web: string;
51
51
  }
52
52
 
53
- export function createTransport(transport?: SMTPTransport | SMTPTransport.Options | string, defaults?: SMTPTransport.Options): Mail;
54
- export function createTransport(transport: SMTPPool | SMTPPool.Options, defaults?: SMTPPool.Options): Mail;
55
- export function createTransport(transport: SendmailTransport | SendmailTransport.Options, defaults?: SendmailTransport.Options): Mail;
56
- export function createTransport(transport: StreamTransport | StreamTransport.Options, defaults?: StreamTransport.Options): Mail;
57
- export function createTransport(transport: JSONTransport | JSONTransport.Options, defaults?: JSONTransport.Options): Mail;
58
- export function createTransport(transport: SESTransport | SESTransport.Options, defaults?: SESTransport.Options): Mail;
59
- export function createTransport(transport: Transport | TransportOptions, defaults?: TransportOptions): Mail;
53
+ export function createTransport(
54
+ transport?: SMTPTransport | SMTPTransport.Options | string,
55
+ defaults?: SMTPTransport.Options,
56
+ ): Transporter<SMTPTransport.SentMessageInfo>;
57
+ export function createTransport(transport: SMTPPool | SMTPPool.Options, defaults?: SMTPPool.Options): Transporter<SMTPPool.SentMessageInfo>;
58
+ export function createTransport(
59
+ transport: SendmailTransport | SendmailTransport.Options,
60
+ defaults?: SendmailTransport.Options,
61
+ ): Transporter<SendmailTransport.SentMessageInfo>;
62
+ export function createTransport(
63
+ transport: StreamTransport | StreamTransport.Options,
64
+ defaults?: StreamTransport.Options,
65
+ ): Transporter<StreamTransport.SentMessageInfo>;
66
+ export function createTransport(
67
+ transport: JSONTransport | JSONTransport.Options,
68
+ defaults?: JSONTransport.Options,
69
+ ): Transporter<JSONTransport.SentMessageInfo>;
70
+ export function createTransport(
71
+ transport: SESTransport | SESTransport.Options,
72
+ defaults?: SESTransport.Options,
73
+ ): Transporter<SESTransport.SentMessageInfo>;
74
+ export function createTransport<T>(transport: Transport<T> | TransportOptions, defaults?: TransportOptions): Transporter<T>;
60
75
 
61
- export function createTestAccount(apiUrl: string, callback: (err: Error | null, testAccount: TestAccount) => void): void;
76
+ export function createTestAccount(
77
+ apiUrl: string,
78
+ callback: (err: Error | null, testAccount: TestAccount) => void,
79
+ ): void;
62
80
  export function createTestAccount(callback: (err: Error | null, testAccount: TestAccount) => void): void;
63
81
  export function createTestAccount(apiUrl?: string): Promise<TestAccount>;
64
82
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -28,11 +28,11 @@ declare namespace JSONTransport {
28
28
  }
29
29
  }
30
30
 
31
- declare class JSONTransport implements Transport {
31
+ declare class JSONTransport implements Transport<JSONTransport.SentMessageInfo> {
32
32
  options: JSONTransport.Options;
33
33
 
34
34
  logger: shared.Logger;
35
- mailer: Mail;
35
+ mailer: Mail<JSONTransport.SentMessageInfo>;
36
36
 
37
37
  name: string;
38
38
  version: string;
@@ -40,7 +40,7 @@ declare class JSONTransport implements Transport {
40
40
  constructor(options: JSONTransport.Options);
41
41
 
42
42
  /** Compiles a mailcomposer message and forwards it to handler that sends it */
43
- send(mail: MailMessage, callback: (err: Error | null, info: JSONTransport.SentMessageInfo) => void): void;
43
+ send(mail: MailMessage<JSONTransport.SentMessageInfo>, callback: (err: Error | null, info: JSONTransport.SentMessageInfo) => void): void;
44
44
  }
45
45
 
46
46
  export = JSONTransport;
File without changes
@@ -5,7 +5,7 @@ import { Socket } from 'net';
5
5
  import { Readable } from 'stream';
6
6
  import { Url } from 'url';
7
7
 
8
- import { SentMessageInfo, Transport, TransportOptions } from '../..';
8
+ import { Transport, TransportOptions } from '../..';
9
9
  import * as shared from '../shared';
10
10
 
11
11
  import DKIM = require('../dkim');
@@ -153,21 +153,21 @@ declare namespace Mail {
153
153
  priority?: "high"|"normal"|"low";
154
154
  }
155
155
 
156
- type PluginFunction = (mail: MailMessage, callback: (err?: Error | null) => void) => void;
156
+ type PluginFunction<T = any> = (mail: MailMessage<T>, callback: (err?: Error | null) => void) => void;
157
157
  }
158
158
 
159
159
  /** Creates an object for exposing the Mail API */
160
- declare class Mail extends EventEmitter {
160
+ declare class Mail<T = any> extends EventEmitter {
161
161
  options: Mail.Options;
162
162
  meta: Map<string, any>;
163
163
  dkim: DKIM;
164
- transporter: Transport;
164
+ transporter: Transport<T>;
165
165
  logger: shared.Logger;
166
166
 
167
167
  /** Usage: typeof transporter.MailMessage */
168
- MailMessage: MailMessage;
168
+ MailMessage: MailMessage<T>;
169
169
 
170
- constructor(transporter: Transport, options?: TransportOptions, defaults?: TransportOptions);
170
+ constructor(transporter: Transport<T>, options?: TransportOptions, defaults?: TransportOptions);
171
171
 
172
172
  /** Closes all connections in the pool. If there is a message being sent, the connection is closed later */
173
173
  close(): void;
@@ -179,11 +179,11 @@ declare class Mail extends EventEmitter {
179
179
  verify(callback: (err: Error | null, success: true) => void): void;
180
180
  verify(): Promise<true>;
181
181
 
182
- use(step: string, plugin: Mail.PluginFunction): this;
182
+ use(step: string, plugin: Mail.PluginFunction<T>): this;
183
183
 
184
184
  /** Sends an email using the preselected transport object */
185
- sendMail(mailOptions: Mail.Options, callback: (err: Error | null, info: SentMessageInfo) => void): void;
186
- sendMail(mailOptions: Mail.Options): Promise<SentMessageInfo>;
185
+ sendMail(mailOptions: Mail.Options, callback: (err: Error | null, info: T) => void): void;
186
+ sendMail(mailOptions: Mail.Options): Promise<T>;
187
187
 
188
188
  getVersionString(): string;
189
189
 
@@ -5,12 +5,12 @@ import { Readable } from 'stream';
5
5
  import Mail = require('.');
6
6
  import MimeNode = require('../mime-node');
7
7
 
8
- declare class MailMessage {
9
- mailer: Mail;
8
+ declare class MailMessage<T = any> {
9
+ mailer: Mail<T>;
10
10
  data: Mail.Options;
11
11
  message: MimeNode;
12
12
 
13
- constructor(mailer: Mail, data: Mail.Options);
13
+ constructor(mailer: Mail<T>, data: Mail.Options);
14
14
 
15
15
  resolveContent(data: object | any[], key: string | number, callback: (err: Error | null, value?: any) => any): Promise<any>;
16
16
 
File without changes
File without changes
@@ -87,8 +87,9 @@ declare class MimeNode {
87
87
  */
88
88
  setContent(content: string | Buffer | Readable): this;
89
89
 
90
- /** Generate the message and return it with a callback */
90
+ /** Generate the message and return it with a callback or promise */
91
91
  build(callback: (err: Error | null, buf: Buffer) => void): void;
92
+ build(): Promise<Buffer>;
92
93
 
93
94
  getTransferEncoding(): string;
94
95
 
File without changes
nodemailer/lib/qp.d.ts CHANGED
File without changes
@@ -28,10 +28,10 @@ declare namespace SendmailTransport {
28
28
  }
29
29
  }
30
30
 
31
- declare class SendmailTransport implements Transport {
31
+ declare class SendmailTransport implements Transport<SendmailTransport.SentMessageInfo> {
32
32
  options: SendmailTransport.Options;
33
33
  logger: shared.Logger;
34
- mailer: Mail;
34
+ mailer: Mail<SendmailTransport.SentMessageInfo>;
35
35
  name: string;
36
36
  version: string;
37
37
  path: string;
@@ -41,7 +41,7 @@ declare class SendmailTransport implements Transport {
41
41
  constructor(options: SendmailTransport.Options);
42
42
 
43
43
  /** Compiles a mailcomposer message and forwards it to handler that sends it */
44
- send(mail: MailMessage, callback: (err: Error | null, info: SendmailTransport.SentMessageInfo) => void): void;
44
+ send(mail: MailMessage<SendmailTransport.SentMessageInfo>, callback: (err: Error | null, info: SendmailTransport.SentMessageInfo) => void): void;
45
45
  }
46
46
 
47
47
  export = SendmailTransport;
File without changes
File without changes
@@ -12,8 +12,57 @@ import MimeNode = require('./mime-node');
12
12
 
13
13
  declare namespace SESTransport {
14
14
  interface MailOptions extends Mail.Options {
15
- /** All keys are added to the SendRawEmail method options */
16
- ses?: object;
15
+ /** list of keys that SendRawEmail method can take */
16
+ ses?: MailSesOptions;
17
+ }
18
+
19
+ interface MailSesOptions {
20
+ /**
21
+ * The identity's email address. If you do not provide a value for this parameter, you must specify a "From" address in the raw text of the message. (You can also specify both.) Amazon SES does not support the SMTPUTF8 extension, as described inRFC6531. For this reason, the local part of a source email address (the part of the email address that precedes the @ sign) may only contain 7-bit ASCII characters. If the domain part of an address (the part after the @ sign) contains non-ASCII characters, they must be encoded using Punycode, as described in RFC3492. The sender name (also known as the friendly name) may contain non-ASCII characters. These characters must be encoded using MIME encoded-word syntax, as described in RFC 2047. MIME encoded-word syntax uses the following form: =?charset?encoding?encoded-text?=. If you specify the Source parameter and have feedback forwarding enabled, then bounces and complaints will be sent to this email address. This takes precedence over any Return-Path header that you might include in the raw text of the message.
22
+ */
23
+ Source?: string;
24
+ /**
25
+ * A list of destinations for the message, consisting of To:, CC:, and BCC: addresses.
26
+ */
27
+ Destinations?: string[];
28
+ /**
29
+ * The raw email message itself. The message has to meet the following criteria: The message has to contain a header and a body, separated by a blank line. All of the required header fields must be present in the message. Each part of a multipart MIME message must be formatted properly. Attachments must be of a content type that Amazon SES supports. For a list on unsupported content types, see Unsupported Attachment Types in the Amazon SES Developer Guide. The entire message must be base64-encoded. If any of the MIME parts in your message contain content that is outside of the 7-bit ASCII character range, we highly recommend that you encode that content. For more information, see Sending Raw Email in the Amazon SES Developer Guide. Per RFC 5321, the maximum length of each line of text, including the &lt;CRLF&gt;, must not exceed 1,000 characters.
30
+ */
31
+ RawMessage?: {
32
+ /**
33
+ * The raw data of the message. This data needs to base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an AWS SDK, the SDK takes care of the base 64-encoding for you. In all cases, the client must ensure that the message format complies with Internet email standards regarding email header fields, MIME types, and MIME encoding. The To:, CC:, and BCC: headers in the raw message can contain a group list. If you are using SendRawEmail with sending authorization, you can include X-headers in the raw message to specify the "Source," "From," and "Return-Path" addresses. For more information, see the documentation for SendRawEmail. Do not include these X-headers in the DKIM signature, because they are removed by Amazon SES before sending the email. For more information, go to the Amazon SES Developer Guide.
34
+ */
35
+ Data: Buffer|Uint8Array|{}|string;
36
+ };
37
+ /**
38
+ * This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to specify a particular "From" address in the header of the raw email. Instead of using this parameter, you can use the X-header X-SES-FROM-ARN in the raw message of the email. If you use both the FromArn parameter and the corresponding X-header, Amazon SES uses the value of the FromArn parameter. For information about when to use this parameter, see the description of SendRawEmail in this guide, or see the Amazon SES Developer Guide.
39
+ */
40
+ FromArn?: string;
41
+ /**
42
+ * This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in the Source parameter. For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to send from user@example.com, then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the Source to be user@example.com. Instead of using this parameter, you can use the X-header X-SES-SOURCE-ARN in the raw message of the email. If you use both the SourceArn parameter and the corresponding X-header, Amazon SES uses the value of the SourceArn parameter. For information about when to use this parameter, see the description of SendRawEmail in this guide, or see the Amazon SES Developer Guide.
43
+ */
44
+ SourceArn?: string;
45
+ /**
46
+ * This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the ReturnPath parameter. For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the ReturnPath to be feedback@example.com. Instead of using this parameter, you can use the X-header X-SES-RETURN-PATH-ARN in the raw message of the email. If you use both the ReturnPathArn parameter and the corresponding X-header, Amazon SES uses the value of the ReturnPathArn parameter. For information about when to use this parameter, see the description of SendRawEmail in this guide, or see the Amazon SES Developer Guide.
47
+ */
48
+ ReturnPathArn?: string;
49
+ /**
50
+ * A list of tags, in the form of name/value pairs, to apply to an email that you send using SendRawEmail. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.
51
+ */
52
+ Tags?: Array<{
53
+ /**
54
+ * The name of the tag. The name must: This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). Contain less than 256 characters.
55
+ */
56
+ Name: string;
57
+ /**
58
+ * The value of the tag. The value must: This value can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). Contain less than 256 characters.
59
+ */
60
+ Value: string;
61
+ }>;
62
+ /**
63
+ * The name of the configuration set to use when you send an email using SendRawEmail.
64
+ */
65
+ ConfigurationSetName?: string;
17
66
  }
18
67
 
19
68
  interface Options extends MailOptions, TransportOptions {
@@ -34,11 +83,11 @@ declare namespace SESTransport {
34
83
  }
35
84
  }
36
85
 
37
- declare class SESTransport extends EventEmitter implements Transport {
86
+ declare class SESTransport extends EventEmitter implements Transport<SESTransport.SentMessageInfo> {
38
87
  options: SESTransport.Options;
39
88
 
40
89
  logger: shared.Logger;
41
- mailer: Mail;
90
+ mailer: Mail<SESTransport.SentMessageInfo>;
42
91
 
43
92
  name: string;
44
93
  version: string;
@@ -51,13 +100,13 @@ declare class SESTransport extends EventEmitter implements Transport {
51
100
  sendingRateTTL: number | null;
52
101
  rateInterval: number;
53
102
  rateMessages: Array<{ ts: number, pending: boolean }>;
54
- pending: Array<{ mail: Mail; callback(err: Error | null, info: SESTransport.SentMessageInfo): void; }>;
103
+ pending: Array<{ mail: Mail<SESTransport.SentMessageInfo>; callback(err: Error | null, info: SESTransport.SentMessageInfo): void; }>;
55
104
  idling: boolean;
56
105
 
57
106
  constructor(options: SESTransport.Options);
58
107
 
59
108
  /** Schedules a sending of a message */
60
- send(mail: MailMessage, callback: (err: Error | null, info: SESTransport.SentMessageInfo) => void): void;
109
+ send(mail: MailMessage<SESTransport.SentMessageInfo>, callback: (err: Error | null, info: SESTransport.SentMessageInfo) => void): void;
61
110
 
62
111
  /** Returns true if there are free slots in the queue */
63
112
  isIdle(): boolean;
File without changes
File without changes
File without changes
File without changes
@@ -43,10 +43,10 @@ declare namespace SMTPPool {
43
43
  /**
44
44
  * Creates a SMTP pool transport object for Nodemailer
45
45
  */
46
- declare class SMTPPool extends EventEmitter implements Transport {
46
+ declare class SMTPPool extends EventEmitter implements Transport<SMTPPool.SentMessageInfo> {
47
47
  options: SMTPPool.Options;
48
48
 
49
- mailer: Mail;
49
+ mailer: Mail<SMTPPool.SentMessageInfo>;
50
50
  logger: shared.Logger;
51
51
 
52
52
  name: string;
@@ -60,7 +60,7 @@ declare class SMTPPool extends EventEmitter implements Transport {
60
60
  getSocket(options: SMTPPool.Options, callback: (err: Error | null, socketOptions: any) => void): void;
61
61
 
62
62
  /** Sends an e-mail using the selected settings */
63
- send(mail: MailMessage, callback: (err: Error | null, info: SMTPPool.SentMessageInfo) => void): void;
63
+ send(mail: MailMessage<SMTPPool.SentMessageInfo>, callback: (err: Error | null, info: SMTPPool.SentMessageInfo) => void): void;
64
64
 
65
65
  /** Closes all connections in the pool. If there is a message being sent, the connection is closed later */
66
66
  close(): void;
File without changes
@@ -53,10 +53,10 @@ declare namespace SMTPTransport {
53
53
  }
54
54
  }
55
55
 
56
- declare class SMTPTransport extends EventEmitter implements Transport {
56
+ declare class SMTPTransport extends EventEmitter implements Transport<SMTPTransport.SentMessageInfo> {
57
57
  options: SMTPTransport.Options;
58
58
 
59
- mailer: Mail;
59
+ mailer: Mail<SMTPTransport.SentMessageInfo>;
60
60
  logger: shared.Logger;
61
61
 
62
62
  name: string;
@@ -72,7 +72,7 @@ declare class SMTPTransport extends EventEmitter implements Transport {
72
72
  getAuth(authOpts: SMTPConnection.AuthenticationTypeLogin | SMTPConnection.AuthenticationTypeOAuth2): SMTPTransport.AuthenticationType;
73
73
 
74
74
  /** Sends an e-mail using the selected settings */
75
- send(mail: MailMessage, callback: (err: Error | null, info: SMTPTransport.SentMessageInfo) => void): void;
75
+ send(mail: MailMessage<SMTPTransport.SentMessageInfo>, callback: (err: Error | null, info: SMTPTransport.SentMessageInfo) => void): void;
76
76
 
77
77
  /** Verifies SMTP configuration */
78
78
  verify(callback: (err: Error | null, success: true) => void): void;
@@ -32,11 +32,11 @@ declare namespace StreamTransport {
32
32
  }
33
33
  }
34
34
 
35
- declare class StreamTransport implements Transport {
35
+ declare class StreamTransport implements Transport<StreamTransport.SentMessageInfo> {
36
36
  options: StreamTransport.Options;
37
37
 
38
38
  logger: shared.Logger;
39
- mailer: Mail;
39
+ mailer: Mail<StreamTransport.SentMessageInfo>;
40
40
 
41
41
  name: string;
42
42
  version: string;
@@ -46,7 +46,7 @@ declare class StreamTransport implements Transport {
46
46
  constructor(options: StreamTransport.Options);
47
47
 
48
48
  /** Compiles a mailcomposer message and forwards it to handler that sends it */
49
- send(mail: MailMessage, callback: (err: Error | null, info: StreamTransport.SentMessageInfo) => void): void;
49
+ send(mail: MailMessage<StreamTransport.SentMessageInfo>, callback: (err: Error | null, info: StreamTransport.SentMessageInfo) => void): void;
50
50
  }
51
51
 
52
52
  export = StreamTransport;
File without changes
File without changes
nodemailer/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/nodemailer",
3
- "version": "6.2.1",
3
+ "version": "6.4.2",
4
4
  "description": "TypeScript definitions for Nodemailer",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -21,7 +21,7 @@
21
21
  }
22
22
  ],
23
23
  "main": "",
24
- "types": "index",
24
+ "types": "index.d.ts",
25
25
  "repository": {
26
26
  "type": "git",
27
27
  "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
@@ -31,6 +31,6 @@
31
31
  "dependencies": {
32
32
  "@types/node": "*"
33
33
  },
34
- "typesPublisherContentHash": "3e7e2627b45c024826aa16aeec391007c7598fdfc1652ecc1fb4f9e7bb1445ca",
35
- "typeScriptVersion": "3.3"
34
+ "typesPublisherContentHash": "d82eae001ee70595c034fcffdcc5c37fd64ef3bcbd31451a0d2479d57fee0233",
35
+ "typeScriptVersion": "3.5"
36
36
  }