schangxiang@126.com
2025-09-19 0821aa23eabe557c0d9ef5dbe6989c68be35d1fe
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
/// <reference types="node" />
 
import { Transport, TransportOptions } from '../..';
 
import * as shared from '../shared';
 
import Mail = require('../mailer');
import MailMessage = require('../mailer/mail-message');
import MimeNode = require('../mime-node');
 
declare namespace SendmailTransport {
    type MailOptions = Mail.Options;
 
    interface Options extends MailOptions, TransportOptions {
        sendmail: true;
        /** path to the sendmail command (defaults to ‘sendmail’) */
        path?: string;
        /** either ‘windows’ or ‘unix’ (default). Forces all newlines in the output to either use Windows syntax <CR><LF> or Unix syntax <LF> */
        newline?: string;
        /** an optional array of command line options to pass to the sendmail command (ie. ["-f", "foo@blurdybloop.com"]). This overrides all default arguments except for ’-i’ and recipient list so you need to make sure you have all required arguments set (ie. the ‘-f’ flag). */
        args?: string[];
    }
 
    interface SentMessageInfo {
        envelope: MimeNode.Envelope;
        messageId: string;
        response: string;
    }
}
 
declare class SendmailTransport implements Transport {
    options: SendmailTransport.Options;
    logger: shared.Logger;
    mailer: Mail;
    name: string;
    version: string;
    path: string;
    args: string[] | false;
    winbreak: boolean;
 
    constructor(options: SendmailTransport.Options);
 
    /** Compiles a mailcomposer message and forwards it to handler that sends it */
    send(mail: MailMessage, callback: (err: Error | null, info: SendmailTransport.SentMessageInfo) => void): void;
}
 
export = SendmailTransport;