@yoshteq/ti365-ts-sdk
    Preparing search index...

    Class SmtpClient

    SMTP TLS Client over Websocket.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    socket: undefined | TlsWebSocket
    reader: undefined | SocketReader
    timeout: number
    debugEnabled: boolean

    set to debug HttpClient with console.log

    onVerifyTlsConnection: (socket: TlsWebSocket) => Promise<void>

    Hook method for double verify a connection aber the tls connection has been established.

    Type Declaration

      • (socket: TlsWebSocket): Promise<void>
      • Parameters

        • socket: TlsWebSocket

          the new opened tls connection.

        Returns Promise<void>

    lastErrorType: SmtpErrorType
    smtpExtensions: string[]

    Methods

    • Waits for the WASM to be loaded, then starts the connection to the WebSocket after that tries to establish a tls connections.

      Returns Promise<void>

      a Promise that resolves after the TLS connection is established, and rejects in case of an error

    • Parameters

      • extension: string

      Returns boolean

    • Returns SmtpErrorType

      the type of the last error

    • Starts the connection and tries to login.

      Parameters

      • username: string
      • password: string

      Returns Promise<SmtpSession>

      If successful it returns an Smtp Session.

      in case of an error the promise will be rejected. For category of the error see {@see getLastErrorType}