pf2pr/mainsms-notifier

Symfony Mainsms Notifier Bridge

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:symfony-notifier-bridge

v0.1.1 2025-06-18 23:38 UTC

This package is auto-updated.

Last update: 2025-06-18 23:39:15 UTC


README

Provides Mainsms integration for Symfony Notifier.

Installation

composer require pf2pr/mainsms-notifier

Configuration

Register the transport factory

# config/services.yaml
Pf2Pr\Notifier\Bridge\Mainsms\MainsmsTransportFactory:
    tags: ['texter.transport_factory']

Configure the transport

# config/packages/notifier.yaml
framework:
    notifier:
        texter_transports:
            mainsms: '%env(MAINSMS_DSN)%'

Then define the DSN in your .env file.

DSN example

MAINSMS_DSN=mainsms://APIKEY@default?project=PROJECT&sender=SENDER&strategy=STRATEGY&timeout=TIMEOUT&test=TEST

DSN parameters

  • APIKEY — Your Mainsms API key (required)
  • project — Project name (required)
  • sender — Sender name (optional)
  • strategy — Message delivery strategy (optional):
    • omitted or -1: SMS only
    • 1: Viber only
    • 2: Viber or SMS
  • timeout — HTTP request timeout (numeric, optional)
  • test — Enable test mode (true or false, default: false) (optional)

Resources