forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodemailer-smtp-transport.d.ts
113 lines (106 loc) · 2.8 KB
/
nodemailer-smtp-transport.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// Type definitions for nodemailer-smtp-transport 1.0.2
// Project: https://github.com/andris9/nodemailer-smtp-transport
// Definitions by: Rogier Schouten <https://github.com/rogierschouten/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/// <reference path="../nodemailer/nodemailer-types.d.ts" />
declare module "nodemailer-smtp-transport" {
import tls = require("tls");
module smtpTransport {
export interface AuthOptions {
user?: string;
pass?: string;
xoauth2?: any;
}
export interface SmtpOptions {
/**
* Fills in certain SMTP configurations options (e.g. 'host', 'port', and 'secure') for
* well-known services. Possible values:
* - '1und1'
* - 'AOL'
* - 'DebugMail.io'
* - 'DynectEmail'
* - 'FastMail'
* - 'GandiMail'
* - 'Gmail'
* - 'Godaddy'
* - 'GodaddyAsia'
* - 'GodaddyEurope'
* - 'hot.ee'
* - 'Hotmail'
* - 'iCloud'
* - 'mail.ee'
* - 'Mail.ru'
* - 'Mailgun'
* - 'Mailjet'
* - 'Mandrill'
* - 'Naver'
* - 'Postmark'
* - 'QQ'
* - 'QQex'
* - 'SendCloud'
* - 'SendGrid'
* - 'SES'
* - 'Sparkpost'
* - 'Yahoo'
* - 'Yandex'
* - 'Zoho'
*/
service?: string;
/**
* is the port to connect to (defaults to 25 or 465)
*/
port?: number;
/**
* is the hostname or IP address to connect to (defaults to 'localhost')
*/
host?: string;
/**
* defines if the connection should use SSL (if true) or not (if false)
*/
secure?: boolean;
/**
* defines authentication data (see authentication section below)
*/
auth?: AuthOptions;
/**
* turns off STARTTLS support if true
*/
ignoreTLS?: boolean;
/**
* optional hostname of the client, used for identifying to the server
*/
name?: string;
/**
* is the local interface to bind to for network connections
*/
localAddress?: string;
/**
* how many milliseconds to wait for the connection to establish
*/
connectionTimeout?: number;
/**
* how many milliseconds to wait for the greeting after connection is established
*/
greetingTimeout?: number;
/**
* how many milliseconds of inactivity to allow
*/
socketTimeout?: number;
/**
* if true, the connection emits all traffic between client and server as 'log' events
*/
debug?: boolean;
/**
* defines preferred authentication method, eg. 'PLAIN'
*/
authMethod?: string;
/**
* defines additional options to be passed to the socket constructor, eg. {rejectUnauthorized: true}
*/
tls?: tls.ConnectionOptions;
}
}
function smtpTransport(options: smtpTransport.SmtpOptions): nodemailer.Transport;
export = smtpTransport;
}