Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@types/nodemailer

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/nodemailer - npm Package Compare versions

Comparing version 1.3.29 to 1.3.30

186

nodemailer/index.d.ts

@@ -7,11 +7,8 @@ // Type definitions for Nodemailer 1.3.2

/// <reference types="node" />
/// <reference path="nodemailer-types.d.ts" />
/// <reference types="bluebird" />
import directTransport = require("nodemailer-direct-transport");
import smtpTransport = require("nodemailer-smtp-transport");
import * as Promise from 'bluebird';
export type Transport = nodemailer.Transport;
export type SendMailOptions = nodemailer.SendMailOptions;
export type SentMessageInfo = nodemailer.SentMessageInfo;
/**

@@ -29,25 +26,36 @@ * Transporter plugin

/**
* Send a mail with callback
*/
* Send a mail with callback
*/
sendMail(mail: SendMailOptions, callback: (error: Error, info: SentMessageInfo) => void): void;
/**
* Send a mail
* Send a mail
* return Promise
*/
*/
sendMail(mail: SendMailOptions): Promise<SentMessageInfo>;
/**
* Attach a plugin. 'compile' and 'stream' plugins can be attached with use(plugin) method
*
* @param step is a string, either 'compile' or 'stream' thatd defines when the plugin should be hooked
* @param pluginFunc is a function that takes two arguments: the mail object and a callback function
*/
use(step: string, plugin: Plugin): void;
/**
* Send mail using a template.
*/
templateSender(template?: any, defaults?: any): (mailData: any, context: any) => Promise<SentMessageInfo>;
/**
* Send mail using a template with a callback.
*/
templateSender(template?: any, defaults?: any, callback?: (error: Error, info: SentMessageInfo) => void): void;
/**
* Verifies connection with server
*/
verify(callback: (error: Error, success?: boolean) => void): void;
/**
* Attach a plugin. 'compile' and 'stream' plugins can be attached with use(plugin) method
*
* @param step is a string, either 'compile' or 'stream' thatd defines when the plugin should be hooked
* @param pluginFunc is a function that takes two arguments: the mail object and a callback function
*/
use(step: string, plugin: Plugin): void;
/**
* Verifies connection with server
*/
verify(callback: (error: Error, success?: boolean) => void): void;
/**

@@ -76,1 +84,139 @@ * Verifies connection with server

export declare function createTransport(transport: Transport, defaults?: Object): Transporter;
export interface AttachmentObject {
/**
* filename to be reported as the name of the attached file, use of unicode is allowed
*/
filename?: string;
/**
* optional content id for using inline images in HTML message source
*/
cid?: string;
/**
* Pathname or URL to use streaming
*/
path?: string;
/**
* String, Buffer or a Stream contents for the attachment
*/
content: string|Buffer|NodeJS.ReadableStream;
/**
* 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.
*/
encoding?: string;
/**
* optional content type for the attachment, if not set will be derived from the filename property
*/
contentType?: string;
/**
* optional content disposition type for the attachment, defaults to 'attachment'
*/
contentDisposition?: string;
}
export interface SendMailOptions {
/**
* 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
*/
from?: string;
/**
* An e-mail address that will appear on the Sender: field
*/
sender?: string;
/**
* Comma separated list or an array of recipients e-mail addresses that will appear on the To: field
*/
to?: string|string[];
/**
* Comma separated list or an array of recipients e-mail addresses that will appear on the Cc: field
*/
cc?: string|string[];
/**
* Comma separated list or an array of recipients e-mail addresses that will appear on the Bcc: field
*/
bcc?: string|string[];
/**
* An e-mail address that will appear on the Reply-To: field
*/
replyTo?: string;
/**
* The message-id this message is replying
*/
inReplyTo?: string;
/**
* Message-id list (an array or space separated string)
*/
references?: string|string[];
/**
* The subject of the e-mail
*/
subject?: string;
/**
* The plaintext version of the message as an Unicode string, Buffer, Stream or an object {path: '...'}
*/
text?: string|Buffer|NodeJS.ReadableStream|AttachmentObject;
/**
* The HTML version of the message as an Unicode string, Buffer, Stream or an object {path: '...'}
*/
html?: string|Buffer|NodeJS.ReadableStream|AttachmentObject;
/**
* 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"}])
*/
headers?: any;
/**
* An array of attachment objects (see below for details)
*/
attachments?: AttachmentObject[];
/**
* An array of alternative text contents (in addition to text and html parts) (see below for details)
*/
alternatives?: AttachmentObject[];
/**
* optional Message-Id value, random value will be generated if not set
*/
messageId?: string;
/**
* optional Date value, current UTC string will be used if not set
*/
date?: Date;
/**
* optional transfer encoding for the textual parts (defaults to 'quoted-printable')
*/
encoding?: string;
}
export interface SentMessageInfo {
/**
* most transports should return the final Message-Id value used with this property
*/
messageId: string;
/**
* includes the envelope object for the message
*/
envelope: any;
/**
* is an array returned by SMTP transports (includes recipient addresses that were accepted by the server)
*/
accepted: string[];
/**
* is an array returned by SMTP transports (includes recipient addresses that were rejected by the server)
*/
rejected: string[];
/**
* is an array returned by Direct SMTP transport. Includes recipient addresses that were temporarily rejected together with the server response
*/
pending?: string[];
/**
* is a string returned by SMTP transports and includes the last SMTP response from the server
*/
response: string;
}
/**
* This is what you implement to create a new transporter yourself
*/
export interface Transport {
name: string;
version: string;
send(mail: SendMailOptions, callback?: (error: Error, info: SentMessageInfo) => void): void;
close(): void;
}

3

nodemailer/package.json
{
"name": "@types/nodemailer",
"version": "1.3.29",
"version": "1.3.30",
"description": "TypeScript definitions for Nodemailer 1.3.2",

@@ -14,2 +14,3 @@ "license": "MIT",

"dependencies": {
"@types/bluebird": "2.0.*",
"@types/nodemailer-direct-transport": "1.0.*",

@@ -16,0 +17,0 @@ "@types/nodemailer-smtp-transport": "1.0.*",

@@ -11,6 +11,6 @@ # Installation

Additional Details
* Last updated: Tue, 02 Aug 2016 15:42:59 GMT
* Last updated: Thu, 11 Aug 2016 21:42:25 GMT
* File structure: ProperModule
* Library Dependencies: node
* Module Dependencies: nodemailer-direct-transport, nodemailer-smtp-transport
* Library Dependencies: bluebird, node
* Module Dependencies: bluebird, nodemailer-direct-transport, nodemailer-smtp-transport
* Global values: none

@@ -17,0 +17,0 @@

@@ -5,5 +5,7 @@ {

"libraryDependencies": [
"bluebird",
"node"
],
"moduleDependencies": [
"bluebird",
"nodemailer-direct-transport",

@@ -25,7 +27,6 @@ "nodemailer-smtp-transport"

"files": [
"index.d.ts",
"nodemailer-types.d.ts"
"index.d.ts"
],
"hasPackageJson": false,
"contentHash": "35018bc3639735d9610046b436c0af081be9f4d3a61f8e586b3dac8dd8e043e3"
"contentHash": "89d6d1bf5605e9632c9acea07b4bc5201e5f2befd39995f721cb8713ad7ebef7"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc