edgeport - v1.0.3
    Preparing search index...

    Interface SendSmsOptions

    Options for sendSms: SMTP connection settings plus the SMS payload.

    1.0.3

    interface SendSmsOptions {
        auth?: {
            mechanism?: "PLAIN" | "LOGIN";
            password: string;
            username: string;
        };
        from: string;
        hostname: string;
        port?: number;
        subject?: string;
        text: string;
        timeoutMs?: number;
        tls?: "off"
        | "starttls"
        | "implicit";
        to: { carrier: string; number: string };
        type?: "sms" | "mms";
    }

    Hierarchy (View Summary)

    Index
    auth?: { mechanism?: "PLAIN" | "LOGIN"; password: string; username: string }

    Credentials; when omitted, no AUTH is attempted.

    Type Declaration

    • Optionalmechanism?: "PLAIN" | "LOGIN"

      Mechanism to use; defaults to 'PLAIN'.

    • password: string

      Login password or app token.

    • username: string

      Login user (often the full email address).

    from: string

    Envelope and header From address.

    hostname: string

    Mail server hostname (also used for TLS certificate validation).

    port?: number

    TCP port; defaults to 587 for starttls and 465 for implicit.

    subject?: string

    Optional subject. Defaults to empty because carrier gateways typically drop or prepend the subject to the body.

    text: string

    Plaintext message body; keep it short since gateways truncate long messages.

    timeoutMs?: number

    Per-step read deadline in milliseconds.

    tls?: "off" | "starttls" | "implicit"

    Transport security:

    • 'starttls' (default): connect in plaintext, upgrade via STARTTLS.
    • 'implicit': TLS from the first byte (SMTPS, port 465).
    • 'off': plaintext with no upgrade (for trusted internal relays / dev servers).
    to: { carrier: string; number: string }

    Recipient handset, addressed by phone number and carrier.

    Type Declaration

    • carrier: string

      A known Carrier key or a raw gateway domain.

    • number: string

      The recipient phone number in any common format.

    type?: "sms" | "mms"

    Address the SMS or MMS gateway; defaults to 'sms'.