PHPackages                             softcomtecnologia/softsend-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. softcomtecnologia/softsend-client

ActiveLibrary

softcomtecnologia/softsend-client
=================================

0.2.1(8y ago)1671MITPHP

Since Nov 2Pushed 8y ago2 watchersCompare

[ Source](https://github.com/softcomtecnologia/softsend-client)[ Packagist](https://packagist.org/packages/softcomtecnologia/softsend-client)[ RSS](/packages/softcomtecnologia-softsend-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (8)Used By (0)

Softsend
========

[](#softsend)

Instalação
----------

[](#instalação)

Em seu arquivo composer.json adicione ao "require":

```
    "require": {
        "softcomtecnologia/softsend-client": "*",
    },
```

Exemplo de Uso
--------------

[](#exemplo-de-uso)

### Obtendo suas Credenciais

[](#obtendo-suas-credenciais)

```
    $clientCnpj = '';
    $name = '';
    $options = [
        'cpf_cnpj'      => '',
        'nome'          => '',       //exemplo, razão social da empresa
        'nome_envio'    => '', //facultativo
    ];

    $storeClient = new StoreClient($options);

    $response = $storeClient->support();

    echo $response;
    /* json response
      {
          "code":1,
          "message":"OK",
          "human":"Sucesso",
          "data":{
              "client_id":"v2eFDOO7gl56Y1C9vfF7bi56.d8gYXoX.voHSqsa",
              "client_secret":"Lb94cPejcZGA.XkrpIs8S4UqB1GqfOdiw1jZVYol8mBo96uGBMVyg9efMm13",
              "device_id":"",
              "device_name":""
          },
          "meta":[]
      }
    */
```

### Autenticação para Acesso a Aplicação

[](#autenticação-para-acesso-a-aplicação)

#### Obtendo Url para Acesso

[](#obtendo-url-para-acesso)

```
    $clientId = 'v2eFDOO7gl56Y1C9vfF7bi56.d8gYXoX.voHSqsa';
    $clientSecret = 'Lb94cPejcZGA.XkrpIs8S4UqB1GqfOdiw1jZVYol8mBo96uGBMVyg9efMm13';
    $domain = 'http://';//facultativo

    $autentication = new AutenticationClient($clientId, $clientSecret, $domain);

    //optional
    $autentication->responseType(SoftsendConfigs::RESPONSE_TYPE_ARRAY);

    $response = $autentication->support();

    print_r($response);
    /* array response
        [
            "code" => 1,
            "message" => "OK",
            "human" => "Sucesso",
            "data" => [
              "url" => "http:///oauth/token?token=f0bd4ed91d0b956be5906a867858a87a8141283e",
              "redirect" => true,
            ]
            "meta" => []
        ]
    */
```

#### Redirecionando

[](#redirecionando)

Com a url de acesso, pode-se realizar o redirecionamento da seguinte forma:

```
    if (isset($response['data']['url'])) {
        header("Location: {$response['data']['url']}");
        exit;
    }

```

### Envios

[](#envios)

#### Email

[](#email)

Para o envio de email deve-se informar o tipo (type) que deseja enviar. Cada tipo pode e deve ter suas regras, segue abaixo dois exemplos um para Aniversario e outro para Recuperação de Senha:

- Exemplo Aniversário

```
    $clientId = 'w9KKB5E_PFdzF1aM-bEL.BJNw-yTnovUFn53.pJe';
    $clientSecret = '5uOuxxzuS-SIT9aMmGd1-C9Jr-XXnONjabYj6WlXbgdURD6aEgoLsOxTVuBz';
    $envios = [
        'type'   => 'ANIVERSARIO',
        'emails' => [
            [
                'nome'  => '',
                'data'  => '01/10/1998',
                'email' => 'email-destinatario@host.com',
            ],
            //...
        ]
    ];

    $support = new SendEmail($envios, $clientId, $clientSecret);

    //optional
    $autentication->responseType(SoftsendConfigs::RESPONSE_TYPE_ARRAY);

    $response = $support->support();
    print_r($response);
    /* array response
        [
            "code" => 1,
            "message" => "OK",
            "human" => "Sucesso",
            "data" => [
                "message" => "Emails enviados",
                "sended" => [
                    [
                        "email" => "your@email.com",
                        //demais campos utilizados por cada type
                    ],
                    //...
                ],
                "fails" => [
                    //emails que não foram validados, vazio caso todos tenha validados.
                ]
            ]
            "meta" => []
        ]
    */
```

- Exemplo Recuperação de Senha

```
    $clientId = 'w9KKB5E_PFdzF1aM-bEL.BJNw-yTnovUFn53.pJe';
    $clientSecret = '5uOuxxzuS-SIT9aMmGd1-C9Jr-XXnONjabYj6WlXbgdURD6aEgoLsOxTVuBz';
    $envios = [
        'type'   => 'ENVIO_SENHA',
        'emails' => [
            [
                'nome'  => '',
                'email' => 'email-destinatario@host.com',
                'recuperar_senha' => ''
            ],
            //...
        ],
    ];

    $support = new SendEmail($envios, $clientId, $clientSecret);

    //optional
    $autentication->responseType(SoftsendConfigs::RESPONSE_TYPE_ARRAY);

    $response = $support->support();

    print_r($response);
    /* array response
        [
            "code" => 1,
            "message" => "OK",
            "human" => "Sucesso",
            "data" => [
                "message" => "Emails enviados",
                "sended" => [
                    [
                        "email" => "your@email.com",
                        //demais campos utilizados por cada type
                    ],
                    //...
                ],
                "fails" => [
                    //emails que não foram validados, vazio caso todos tenha validados.
                ]
            ]
            "meta" => []
        ]
    */
```

- Email com Anexo

```
    $clientId = 'w9KKB5E_PFdzF1aM-bEL.BJNw-yTnovUFn53.pJe';
    $clientSecret = '5uOuxxzuS-SIT9aMmGd1-C9Jr-XXnONjabYj6WlXbgdURD6aEgoLsOxTVuBz';
    $envios = [
        'type'   => 'ENVIO_SENHA',
        'emails' => [
            [
                'nome'  => '',
                'email' => 'email-destinatario@host.com',
                'recuperar_senha' => ''
            ],
            //...
        ],
        'attachment' => [
            "/your-attachment.pdf",
            "/other-attachment.docx"
        ],
    ];

    $support = new SendEmailAttachment($envios, $clientId, $clientSecret);

    //optional
    $autentication->responseType(SoftsendConfigs::RESPONSE_TYPE_ARRAY);

    $response = $support->support();

    print_r($response);
    /* array response
        [
            "code" => 1,
            "message" => "OK",
            "human" => "Sucesso",
            "data" => [
                "message" => "Emails enviados",
                "sended" => [
                    [
                        "email" => "your@email.com",
                        //demais campos utilizados por cada type
                    ],
                    //...
                ],
                "fails" => [
                    //emails que não foram validados, vazio caso todos tenha validados.
                ]
            ]
            "meta" => []
        ]
    */
```

#### SMS

[](#sms)

Para o envio de sms deve-se informar o tipo (type) que deseja enviar. Cada tipo pode e deve ter suas regras, segue abaixo dois exemplos um para Aniversario e outro para Cobrança:

- Exemplo Aniversário

```
    $clientId = 'w9KKB5E_PFdzF1aM-bEL.BJNw-yTnovUFn53.pJe';
    $clientSecret = '5uOuxxzuS-SIT9aMmGd1-C9Jr-XXnONjabYj6WlXbgdURD6aEgoLsOxTVuBz';
    $envios = [
        'type' => 'ANIVERSARIO',
        'sms' => [
            [
                'nome'  => '',
                'fone' => '',
            ],
            //...
        ]
    ];

    $support = new SendSms($envios, $clientId, $clientSecret);

    //optional
    $autentication->responseType(SoftsendConfigs::RESPONSE_TYPE_ARRAY);

    $response = $support->support();
    print_r($response);
    /* array response
        [
            "code" => 1,
            "message" => "OK",
            "human" => "Sucesso",
            "data" => [
                "message" => "Enviados 10/10. Não enviados 0",
                "sended" => [
                    [
                        "fone" => "",
                        //demais campos utilizados por cada type
                    ],
                    //...
                ],
                "fails" => [
                    //sms que não foram validados, vazio caso todos tenha validados.
                ]
            ]
            "meta" => []
        ]
    */
```

- Exemplo Cobrança

```
    $clientId = 'w9KKB5E_PFdzF1aM-bEL.BJNw-yTnovUFn53.pJe';
    $clientSecret = '5uOuxxzuS-SIT9aMmGd1-C9Jr-XXnONjabYj6WlXbgdURD6aEgoLsOxTVuBz';
    $envios = [
        'type' => 'COBRANCA',
        'sms' => [
            [
                'nome'  => '',
                'fone' => '',
            ],
            //...
        ],
    ];

    $support = new SendSms($envios, $clientId, $clientSecret);

    //optional
    $autentication->responseType(SoftsendConfigs::RESPONSE_TYPE_ARRAY);

    $response = $support->support();
    print_r($response);
    /* array response
        [
            "code" => 1,
            "message" => "OK",
            "human" => "Sucesso",
            "data" => [
                "message" => "Enviados 10/10. Não enviados 0",
                "sended" => [
                    [
                        "fone" => "",
                        //demais campos utilizados por cada type
                    ],
                    //...
                ],
                "fails" => [
                    //sms que não foram validados, vazio caso todos tenha validados.
                ]
            ]
            "meta" => []
        ]
    */
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Total

7

Last Release

2965d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/23b53d117e80a86fbcdf5c2755f36dd2c8275c41125d4c11c969cae95605fddb?d=identicon)[softcomtecnologia](/maintainers/softcomtecnologia)

---

Top Contributors

[![igorwanbarros](https://avatars.githubusercontent.com/u/8918508?v=4)](https://github.com/igorwanbarros "igorwanbarros (21 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/softcomtecnologia-softsend-client/health.svg)

```
[![Health](https://phpackages.com/badges/softcomtecnologia-softsend-client/health.svg)](https://phpackages.com/packages/softcomtecnologia-softsend-client)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
