edgeport - v1.0.3
    Preparing search index...

    Function sendMessage

    • Sends a single message in one call: bind, submit, unbind.

      A convenience wrapper over connect + SmppSession.submit for the fire-once case; it binds as a transmitter by default (override with bindMode). The session is always closed, even if the submission throws.

      Parameters

      Returns Promise<string>

      The SMSC-assigned message_id.

      If the SMSC rejects the credentials.

      If the connection cannot be established.

      If the SMSC rejects the submission.

      1.0.3

      import { sendMessage } from 'edgeport/smpp';

      const id = await sendMessage({
      hostname: 'smsc.example.com',
      systemId: 'esme',
      password: env.SMPP_PW,
      source: 'EDGEPORT',
      destination: '12065550111',
      message: 'one-shot SMS from the edge'
      });