@types/nodemailer 3.1.5 → 3.1.8

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.
@@ -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
@@ -0,0 +1,16 @@
1
+ # Installation
2
+ > `npm install --save @types/nodemailer`
3
+
4
+ # Summary
5
+ This package contains type definitions for Nodemailer (https://github.com/andris9/Nodemailer).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer/v3.
9
+
10
+ ### Additional Details
11
+ * Last updated: Tue, 19 Apr 2022 16:31:33 GMT
12
+ * Dependencies: [@types/nodemailer-direct-transport](https://npmjs.com/package/@types/nodemailer-direct-transport), [@types/nodemailer-smtp-transport](https://npmjs.com/package/@types/nodemailer-smtp-transport), [@types/nodemailer-ses-transport](https://npmjs.com/package/@types/nodemailer-ses-transport), [@types/node](https://npmjs.com/package/@types/node)
13
+ * Global values: none
14
+
15
+ # Credits
16
+ These definitions were written by [Rogier Schouten](https://github.com/rogierschouten).
@@ -0,0 +1,215 @@
1
+ // Type definitions for Nodemailer 3.1.5
2
+ // Project: https://github.com/andris9/Nodemailer
3
+ // Definitions by: Rogier Schouten <https://github.com/rogierschouten>
4
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+
6
+ /// <reference types="node" />
7
+
8
+ import directTransport = require("nodemailer-direct-transport");
9
+ import smtpTransport = require("nodemailer-smtp-transport");
10
+ import sesTransport = require("nodemailer-ses-transport")
11
+
12
+ /**
13
+ * Transporter plugin
14
+ */
15
+ export interface Plugin {
16
+ (mail: SendMailOptions, callback?: (error: Error, info: SentMessageInfo) => void): void;
17
+ }
18
+
19
+ /**
20
+ * This is what you use to send mail
21
+ */
22
+ export interface Transporter {
23
+ /**
24
+ * Send a mail with callback
25
+ */
26
+ sendMail(mail: SendMailOptions, callback: (error: Error, info: SentMessageInfo) => void): void;
27
+
28
+ /**
29
+ * Send a mail
30
+ * return Promise
31
+ */
32
+ sendMail(mail: SendMailOptions): Promise<SentMessageInfo>;
33
+
34
+ /**
35
+ * Attach a plugin. 'compile' and 'stream' plugins can be attached with use(plugin) method
36
+ *
37
+ * @param step is a string, either 'compile' or 'stream' thatd defines when the plugin should be hooked
38
+ * @param pluginFunc is a function that takes two arguments: the mail object and a callback function
39
+ */
40
+ use(step: string, plugin: Plugin): void;
41
+
42
+ /**
43
+ * Verifies connection with server
44
+ */
45
+ verify(callback: (error: Error, success?: boolean) => void): void;
46
+
47
+ /**
48
+ * Verifies connection with server
49
+ */
50
+ verify(): Promise<void>;
51
+
52
+ /**
53
+ * Close all connections
54
+ */
55
+ close?(): void;
56
+ }
57
+
58
+ /**
59
+ * Create a direct transporter
60
+ */
61
+ export declare function createTransport(options?: directTransport.DirectOptions, defaults?: Object): Transporter;
62
+ /**
63
+ * Create an SMTP transporter
64
+ */
65
+ export declare function createTransport(options?: smtpTransport.SmtpOptions, defaults?: Object): Transporter;
66
+ /**
67
+ * Create an SMTP transporter using a connection url
68
+ */
69
+ export declare function createTransport(connectionUrl: string, defaults?: Object): Transporter;
70
+ /**
71
+ * Create an AWS SES transporter
72
+ */
73
+ export declare function createTransport(options?: sesTransport.SesOptions, defaults?: Object): Transporter;
74
+ /**
75
+ * Create a transporter from a given implementation
76
+ */
77
+ export declare function createTransport(transport: Transport, defaults?: Object): Transporter;
78
+ export interface AttachmentObject {
79
+ /**
80
+ * filename to be reported as the name of the attached file, use of unicode is allowed
81
+ */
82
+ filename?: string | undefined;
83
+ /**
84
+ * optional content id for using inline images in HTML message source
85
+ */
86
+ cid?: string | undefined;
87
+ /**
88
+ * Pathname or URL to use streaming
89
+ */
90
+ path?: string | undefined;
91
+ /**
92
+ * String, Buffer or a Stream contents for the attachment
93
+ */
94
+ content: string|Buffer|NodeJS.ReadableStream;
95
+ /**
96
+ * If set and content is string, then encodes the content to a Buffer using the specified encoding. Example values: base64, hex, 'binary' etc. Useful if you want to use binary attachments in a JSON formatted e-mail object.
97
+ */
98
+ encoding?: string | undefined;
99
+ /**
100
+ * optional content type for the attachment, if not set will be derived from the filename property
101
+ */
102
+ contentType?: string | undefined;
103
+ /**
104
+ * optional content disposition type for the attachment, defaults to 'attachment'
105
+ */
106
+ contentDisposition?: string | undefined;
107
+ }
108
+
109
+ export interface SendMailOptions {
110
+ /**
111
+ * The e-mail address of the sender. All e-mail addresses can be plain 'sender@server.com' or formatted 'Sender Name <sender@server.com>', see here for details
112
+ */
113
+ from?: string | undefined;
114
+ /**
115
+ * An e-mail address that will appear on the Sender: field
116
+ */
117
+ sender?: string | undefined;
118
+ /**
119
+ * Comma separated list or an array of recipients e-mail addresses that will appear on the To: field
120
+ */
121
+ to?: string|string[] | undefined;
122
+ /**
123
+ * Comma separated list or an array of recipients e-mail addresses that will appear on the Cc: field
124
+ */
125
+ cc?: string|string[] | undefined;
126
+ /**
127
+ * Comma separated list or an array of recipients e-mail addresses that will appear on the Bcc: field
128
+ */
129
+ bcc?: string|string[] | undefined;
130
+ /**
131
+ * An e-mail address that will appear on the Reply-To: field
132
+ */
133
+ replyTo?: string | undefined;
134
+ /**
135
+ * The message-id this message is replying
136
+ */
137
+ inReplyTo?: string | undefined;
138
+ /**
139
+ * Message-id list (an array or space separated string)
140
+ */
141
+ references?: string|string[] | undefined;
142
+ /**
143
+ * The subject of the e-mail
144
+ */
145
+ subject?: string | undefined;
146
+ /**
147
+ * The plaintext version of the message as an Unicode string, Buffer, Stream or an object {path: '...'}
148
+ */
149
+ text?: string|Buffer|NodeJS.ReadableStream|AttachmentObject | undefined;
150
+ /**
151
+ * The HTML version of the message as an Unicode string, Buffer, Stream or an object {path: '...'}
152
+ */
153
+ html?: string|Buffer|NodeJS.ReadableStream|AttachmentObject | undefined;
154
+ /**
155
+ * An object or array of additional header fields (e.g. {"X-Key-Name": "key value"} or [{key: "X-Key-Name", value: "val1"}, {key: "X-Key-Name", value: "val2"}])
156
+ */
157
+ headers?: any;
158
+ /**
159
+ * An array of attachment objects (see below for details)
160
+ */
161
+ attachments?: AttachmentObject[] | undefined;
162
+ /**
163
+ * An array of alternative text contents (in addition to text and html parts) (see below for details)
164
+ */
165
+ alternatives?: AttachmentObject[] | undefined;
166
+ /**
167
+ * optional Message-Id value, random value will be generated if not set
168
+ */
169
+ messageId?: string | undefined;
170
+ /**
171
+ * optional Date value, current UTC string will be used if not set
172
+ */
173
+ date?: Date | undefined;
174
+ /**
175
+ * optional transfer encoding for the textual parts (defaults to 'quoted-printable')
176
+ */
177
+ encoding?: string | undefined;
178
+ }
179
+
180
+ export interface SentMessageInfo {
181
+ /**
182
+ * most transports should return the final Message-Id value used with this property
183
+ */
184
+ messageId: string;
185
+ /**
186
+ * includes the envelope object for the message
187
+ */
188
+ envelope: any;
189
+ /**
190
+ * is an array returned by SMTP transports (includes recipient addresses that were accepted by the server)
191
+ */
192
+ accepted: string[];
193
+ /**
194
+ * is an array returned by SMTP transports (includes recipient addresses that were rejected by the server)
195
+ */
196
+ rejected: string[];
197
+ /**
198
+ * is an array returned by Direct SMTP transport. Includes recipient addresses that were temporarily rejected together with the server response
199
+ */
200
+ pending?: string[] | undefined;
201
+ /**
202
+ * is a string returned by SMTP transports and includes the last SMTP response from the server
203
+ */
204
+ response: string;
205
+ }
206
+
207
+ /**
208
+ * This is what you implement to create a new transporter yourself
209
+ */
210
+ export interface Transport {
211
+ name: string;
212
+ version: string;
213
+ send(mail: SendMailOptions, callback?: (error: Error, info: SentMessageInfo) => void): void;
214
+ close(): void;
215
+ }
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@types/nodemailer",
3
- "version": "3.1.5",
3
+ "version": "3.1.8",
4
4
  "description": "TypeScript definitions for Nodemailer",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer",
5
6
  "license": "MIT",
6
7
  "contributors": [
7
8
  {
@@ -11,18 +12,20 @@
11
12
  }
12
13
  ],
13
14
  "main": "",
15
+ "types": "index.d.ts",
14
16
  "repository": {
15
17
  "type": "git",
16
- "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
18
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
+ "directory": "types/nodemailer"
17
20
  },
18
21
  "scripts": {},
19
22
  "dependencies": {
20
- "aws-sdk": "^2.37.0",
23
+ "@types/node": "*",
21
24
  "@types/nodemailer-direct-transport": "*",
22
- "@types/nodemailer-smtp-transport": "*",
23
25
  "@types/nodemailer-ses-transport": "*",
24
- "@types/node": "*"
26
+ "@types/nodemailer-smtp-transport": "*",
27
+ "aws-sdk": "^2.814.0"
25
28
  },
26
- "typesPublisherContentHash": "3db615e30f9a30bc52fecbdddc8a13d7089b0ccf5323502a67a0a597818f1715",
27
- "typeScriptVersion": "2.0"
29
+ "typesPublisherContentHash": "3413e63bd8599442c4427ef9629ec2995918816b2eb6ef78831085b0f373db46",
30
+ "typeScriptVersion": "3.9"
28
31
  }
nodemailer v3/README.md DELETED
@@ -1,16 +0,0 @@
1
- # Installation
2
- > `npm install --save @types/nodemailer`
3
-
4
- # Summary
5
- This package contains type definitions for Nodemailer (https://github.com/andris9/Nodemailer).
6
-
7
- # Details
8
- Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nodemailer/v3
9
-
10
- Additional Details
11
- * Last updated: Wed, 25 Oct 2017 18:38:03 GMT
12
- * Dependencies: nodemailer-direct-transport, nodemailer-smtp-transport, nodemailer-ses-transport, node
13
- * Global values: none
14
-
15
- # Credits
16
- These definitions were written by Rogier Schouten <https://github.com/rogierschouten>.
@@ -1,215 +0,0 @@
1
- // Type definitions for Nodemailer 3.1.5
2
- // Project: https://github.com/andris9/Nodemailer
3
- // Definitions by: Rogier Schouten <https://github.com/rogierschouten>
4
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
-
6
- /// <reference types="node" />
7
-
8
- import directTransport = require("nodemailer-direct-transport");
9
- import smtpTransport = require("nodemailer-smtp-transport");
10
- import sesTransport = require("nodemailer-ses-transport")
11
-
12
- /**
13
- * Transporter plugin
14
- */
15
- export interface Plugin {
16
- (mail: SendMailOptions, callback?: (error: Error, info: SentMessageInfo) => void): void;
17
- }
18
-
19
- /**
20
- * This is what you use to send mail
21
- */
22
- export interface Transporter {
23
- /**
24
- * Send a mail with callback
25
- */
26
- sendMail(mail: SendMailOptions, callback: (error: Error, info: SentMessageInfo) => void): void;
27
-
28
- /**
29
- * Send a mail
30
- * return Promise
31
- */
32
- sendMail(mail: SendMailOptions): Promise<SentMessageInfo>;
33
-
34
- /**
35
- * Attach a plugin. 'compile' and 'stream' plugins can be attached with use(plugin) method
36
- *
37
- * @param step is a string, either 'compile' or 'stream' thatd defines when the plugin should be hooked
38
- * @param pluginFunc is a function that takes two arguments: the mail object and a callback function
39
- */
40
- use(step: string, plugin: Plugin): void;
41
-
42
- /**
43
- * Verifies connection with server
44
- */
45
- verify(callback: (error: Error, success?: boolean) => void): void;
46
-
47
- /**
48
- * Verifies connection with server
49
- */
50
- verify(): Promise<void>;
51
-
52
- /**
53
- * Close all connections
54
- */
55
- close?(): void;
56
- }
57
-
58
- /**
59
- * Create a direct transporter
60
- */
61
- export declare function createTransport(options?: directTransport.DirectOptions, defaults?: Object): Transporter;
62
- /**
63
- * Create an SMTP transporter
64
- */
65
- export declare function createTransport(options?: smtpTransport.SmtpOptions, defaults?: Object): Transporter;
66
- /**
67
- * Create an SMTP transporter using a connection url
68
- */
69
- export declare function createTransport(connectionUrl: string, defaults?: Object): Transporter;
70
- /**
71
- * Create an AWS SES transporter
72
- */
73
- export declare function createTransport(options?: sesTransport.SesOptions, defaults?: Object): Transporter;
74
- /**
75
- * Create a transporter from a given implementation
76
- */
77
- export declare function createTransport(transport: Transport, defaults?: Object): Transporter;
78
- export interface AttachmentObject {
79
- /**
80
- * filename to be reported as the name of the attached file, use of unicode is allowed
81
- */
82
- filename?: string;
83
- /**
84
- * optional content id for using inline images in HTML message source
85
- */
86
- cid?: string;
87
- /**
88
- * Pathname or URL to use streaming
89
- */
90
- path?: string;
91
- /**
92
- * String, Buffer or a Stream contents for the attachment
93
- */
94
- content: string|Buffer|NodeJS.ReadableStream;
95
- /**
96
- * If set and content is string, then encodes the content to a Buffer using the specified encoding. Example values: base64, hex, 'binary' etc. Useful if you want to use binary attachments in a JSON formatted e-mail object.
97
- */
98
- encoding?: string;
99
- /**
100
- * optional content type for the attachment, if not set will be derived from the filename property
101
- */
102
- contentType?: string;
103
- /**
104
- * optional content disposition type for the attachment, defaults to 'attachment'
105
- */
106
- contentDisposition?: string;
107
- }
108
-
109
- export interface SendMailOptions {
110
- /**
111
- * The e-mail address of the sender. All e-mail addresses can be plain 'sender@server.com' or formatted 'Sender Name <sender@server.com>', see here for details
112
- */
113
- from?: string;
114
- /**
115
- * An e-mail address that will appear on the Sender: field
116
- */
117
- sender?: string;
118
- /**
119
- * Comma separated list or an array of recipients e-mail addresses that will appear on the To: field
120
- */
121
- to?: string|string[];
122
- /**
123
- * Comma separated list or an array of recipients e-mail addresses that will appear on the Cc: field
124
- */
125
- cc?: string|string[];
126
- /**
127
- * Comma separated list or an array of recipients e-mail addresses that will appear on the Bcc: field
128
- */
129
- bcc?: string|string[];
130
- /**
131
- * An e-mail address that will appear on the Reply-To: field
132
- */
133
- replyTo?: string;
134
- /**
135
- * The message-id this message is replying
136
- */
137
- inReplyTo?: string;
138
- /**
139
- * Message-id list (an array or space separated string)
140
- */
141
- references?: string|string[];
142
- /**
143
- * The subject of the e-mail
144
- */
145
- subject?: string;
146
- /**
147
- * The plaintext version of the message as an Unicode string, Buffer, Stream or an object {path: '...'}
148
- */
149
- text?: string|Buffer|NodeJS.ReadableStream|AttachmentObject;
150
- /**
151
- * The HTML version of the message as an Unicode string, Buffer, Stream or an object {path: '...'}
152
- */
153
- html?: string|Buffer|NodeJS.ReadableStream|AttachmentObject;
154
- /**
155
- * An object or array of additional header fields (e.g. {"X-Key-Name": "key value"} or [{key: "X-Key-Name", value: "val1"}, {key: "X-Key-Name", value: "val2"}])
156
- */
157
- headers?: any;
158
- /**
159
- * An array of attachment objects (see below for details)
160
- */
161
- attachments?: AttachmentObject[];
162
- /**
163
- * An array of alternative text contents (in addition to text and html parts) (see below for details)
164
- */
165
- alternatives?: AttachmentObject[];
166
- /**
167
- * optional Message-Id value, random value will be generated if not set
168
- */
169
- messageId?: string;
170
- /**
171
- * optional Date value, current UTC string will be used if not set
172
- */
173
- date?: Date;
174
- /**
175
- * optional transfer encoding for the textual parts (defaults to 'quoted-printable')
176
- */
177
- encoding?: string;
178
- }
179
-
180
- export interface SentMessageInfo {
181
- /**
182
- * most transports should return the final Message-Id value used with this property
183
- */
184
- messageId: string;
185
- /**
186
- * includes the envelope object for the message
187
- */
188
- envelope: any;
189
- /**
190
- * is an array returned by SMTP transports (includes recipient addresses that were accepted by the server)
191
- */
192
- accepted: string[];
193
- /**
194
- * is an array returned by SMTP transports (includes recipient addresses that were rejected by the server)
195
- */
196
- rejected: string[];
197
- /**
198
- * is an array returned by Direct SMTP transport. Includes recipient addresses that were temporarily rejected together with the server response
199
- */
200
- pending?: string[];
201
- /**
202
- * is a string returned by SMTP transports and includes the last SMTP response from the server
203
- */
204
- response: string;
205
- }
206
-
207
- /**
208
- * This is what you implement to create a new transporter yourself
209
- */
210
- export interface Transport {
211
- name: string;
212
- version: string;
213
- send(mail: SendMailOptions, callback?: (error: Error, info: SentMessageInfo) => void): void;
214
- close(): void;
215
- }