-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtypes.d.ts
More file actions
72 lines (60 loc) · 1.95 KB
/
types.d.ts
File metadata and controls
72 lines (60 loc) · 1.95 KB
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
// Type definitions for smtp-client 0.3
// Project: https://github.com/xpepermint/smtp-client#readme
// Definitions by: TANGUY Antoine <https://github.com/tanguyantoine>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export class SMTPClient {
constructor(options?: SMTPClientOptions)
authLogin(options?: AuthLoginOptions): Promise<void>
authPlain(options?: AuthPlainOptions): Promise<void>
close(options?: TimeoutOptions): Promise<void>
connect(options?: TimeoutOptions): Promise<void>
data(data: string | Buffer, options?: DataOptions): Promise<void>
mail(options?: MailOptions): Promise<void>
quit(options?: TimeoutOptions): Promise<void>
rcpt(options?: RcptOptions): Promise<void>
greet(options?: GreetOptions): Promise<void>
helo(options?: HeloOptions): Promise<void>
ehlo(options?: EhloOptions): Promise<void>
hasExtension(extensions: string): boolean
getDataSizeLimit(): number
getAuthMechanisms(): string[]
parseEnhancedReplyCode(line: string): string | null
parseReplyText(line: string): string
noop(options?: TimeoutOptions): Promise<void>
secure(options?: TimeoutOptions): Promise<void>
}
export interface TimeoutOptions {
timeout?: number
}
export interface HeloOptions extends TimeoutOptions {
hostname?: string
}
export interface EhloOptions extends TimeoutOptions {
hostname?: string
}
export interface SMTPClientOptions {
host?: string
port?: number
}
export interface AuthPlainOptions extends TimeoutOptions {
username?: string
password?: string
}
export interface AuthLoginOptions extends TimeoutOptions {
username?: string
password?: string
}
export interface GreetOptions extends TimeoutOptions {
hostname?: string
}
export interface MailOptions extends TimeoutOptions {
from?: string
utf8?: boolean
}
export interface RcptOptions extends TimeoutOptions {
to?: string
}
export interface DataOptions extends TimeoutOptions {
sourceSize?: number
}