mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 03:02:04 +08:00
Merge pull request #26667 from dex4er/nodemailer
Nodemailer: update to v4.6.7
This commit is contained in:
1
types/nodemailer/lib/json-transport.d.ts
vendored
1
types/nodemailer/lib/json-transport.d.ts
vendored
@@ -15,6 +15,7 @@ declare namespace JSONTransport {
|
||||
|
||||
interface Options extends MailOptions, TransportOptions {
|
||||
jsonTransport: true;
|
||||
skipEncoding?: boolean;
|
||||
}
|
||||
|
||||
interface SentMessageInfo {
|
||||
|
||||
2
types/nodemailer/lib/mailer/index.d.ts
vendored
2
types/nodemailer/lib/mailer/index.d.ts
vendored
@@ -165,7 +165,7 @@ declare class Mail extends EventEmitter {
|
||||
verify(callback: (err: Error | null, success: true) => void): void;
|
||||
verify(): Promise<true>;
|
||||
|
||||
use(step: string, plugin: Mail.PluginFunction): void; // TODO Plugin?
|
||||
use(step: string, plugin: Mail.PluginFunction): this;
|
||||
|
||||
/** Sends an email using the preselected transport object */
|
||||
sendMail(mailOptions: Mail.Options, callback: (err: Error | null, info: SentMessageInfo) => void): void;
|
||||
|
||||
@@ -832,7 +832,8 @@ function stream_buffer_unix_newlines_test() {
|
||||
|
||||
function json_test() {
|
||||
const transporter = nodemailer.createTransport({
|
||||
jsonTransport: true
|
||||
jsonTransport: true,
|
||||
skipEncoding: true
|
||||
});
|
||||
transporter.sendMail({
|
||||
from: 'sender@example.com',
|
||||
|
||||
Reference in New Issue
Block a user