PHPackages                             karacweb/infomaniak-newsletter - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. karacweb/infomaniak-newsletter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

karacweb/infomaniak-newsletter
==============================

Implementation of the Infomaniak's newsletter service for Laravel

1.0.5(1y ago)11.8k1MITPHPPHP ^7.4|^8.0

Since Dec 30Pushed 1y ago3 watchersCompare

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

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

[![Latest Stable Version](https://camo.githubusercontent.com/b7d1977181e69438c945fe7a9a74f243e1cdbcabcd6be918af9b5a7b48ef045e/687474703a2f2f706f7365722e707567782e6f72672f6b617261637765622f696e666f6d616e69616b2d6e6577736c65747465722f76)](https://packagist.org/packages/karacweb/infomaniak-newsletter)

Infomaniak Newsletter for Laravel helps you interact with Infomaniak's API.

Installation
------------

[](#installation)

Install the package through Composer.

Run the Composer require command from the terminal:

```
composer require karacweb/infomaniak-newsletter

```

Publish the configuration using the following command:

```
php artisan vendor:publish --provider="Karacweb\InfomaniakNewsletter\ServiceProvider"

```

Configuration
-------------

[](#configuration)

Set your env keys and list(s) id(s) in `config/infomaniak-newsletter.php`.

```
return [
    /*
     * The API keys of an Infomaniak newsletter account. You can find yours at
     * https://newsletter.infomaniak.com/accounts/access-token
     */
    'apiKey' => env('INFOMANIAK_APIKEY'),
    'secretKey' => env('INFOMANIAK_SECRETKEY'),

    /*
     * The listName to use when no listName has been specified in a method.
     */
    'defaultListName' => 'subscribers',

    /*
     * Here you can define properties of the lists.
     */
    'lists' => [

        /*
         * This key is used to identify this list. It can be used
         * as the listName parameter provided in the various methods.
         *
         * You can set it to any string you want and you can add
         * as many lists as you want.
         */
        'subscribers' => [

            /*
             * Id of a newsletter contact list. You can retrieve it
             * by looking at the last characters of the list's URL :
             * https://newsletter.infomaniak.com/mailinglists/show/XXXXX
             */
            'id' => env('INFOMANIAK_LISTID'),

        ],
    ],
];
```

Usage
-----

[](#usage)

### NewsletterInfomaniak::importContact()

[](#newsletterinfomaniakimportcontact)

Subscribe an email address to the default list.

```
use InfomaniakNewsletter;

InfomaniakNewsletter::importContact("email@example.com");
```

Provide a `firstname` and a `lastname` as an optional parameter.

```
InfomaniakNewsletter::importContact("email@example.com", ["firstname" => "John", "lastname" => "Doe"]);
```

Finally, choose the list to add the email to as a third parameter.

```
InfomaniakNewsletter::importContact("email@example.com", [], "subscribers");
```

### NewsletterInfomaniak::isSubscribed()

[](#newsletterinfomaniakissubscribed)

Check if the email is subscribed to the default list.

```
InfomaniakNewsletter::isSubscribed("email@example.com");
```

Check if the email is subscribed in the `subscribers` list.

```
InfomaniakNewsletter::isSubscribed("email@example.com", "subscribers");
```

### NewsletterInfomaniak::unsubscribeContact()

[](#newsletterinfomaniakunsubscribecontact)

Unsubscribe an email from the default list. The contact is not deleted, only its status change.

```
InfomaniakNewsletter::unsubscribeContact("email@example.com");
```

Unsubscribe an email from the `subscribers` list.

```
InfomaniakNewsletter::unsubscribeContact("email@example.com", "subscribers");
```

### NewsletterInfomaniak::deleteContact()

[](#newsletterinfomaniakdeletecontact)

Remove an email from the default list.

```
InfomaniakNewsletter::deleteContact("email@example.com");
```

Remove an email from the `subscribers` list

```
InfomaniakNewsletter::deleteContact("email@example.com", "subscribers");
```

### NewsletterInfomaniak::getContact()

[](#newsletterinfomaniakgetcontact)

Get the data regarding a contact.

```
InfomaniakNewsletter::getContact("email@example.com");
```

### NewsletterInfomaniak::getContacts()

[](#newsletterinfomaniakgetcontacts)

Get the contacts from the default list. The result is paginated.

```
InfomaniakNewsletter::getContacts();
```

Get the contacts from the `subscribers` list.

```
InfomaniakNewsletter::getContacts("subscribers");
```

Get the contact from the `subscribers` list with specified pagination options.

```
InfomaniakNewsletter::getContacts("subscribers", ["page" => 2, "perPage" => 50]);
```

### NewsletterInfomaniak::updateContact()

[](#newsletterinfomaniakupdatecontact)

Update the firstname of a contact. This updates the contacts in all the mailing lists of the account.

```
InfomaniakNewsletter::updateContact("email@example.com", ["firstname" => "Joe"]);
```

You can provide a lastname too.

```
InfomaniakNewsletter::updateContact("email@example.com", ["firstname" => "Joe", "lastname" => "Donovan"]);
```

### NewsletterInfomaniak::getMailinglists()

[](#newsletterinfomaniakgetmailinglists)

Get the account's mailing lists. The result is paginated.

```
InfomaniakNewsletter::getMailinglists();
```

Get the account's mailing lists with specified pagination options.

```
InfomaniakNewsletter::getMailinglists(["page" => 1, "perPage" => 50]);
```

### NewsletterInfomaniak::getMailinglist()

[](#newsletterinfomaniakgetmailinglist)

Get the information of the default list.

```
InfomaniakNewsletter::getMailinglist();
```

Get the information of the `subscribers` list.

```
InfomaniakNewsletter::getMailinglist("subscribers");
```

### NewsletterInfomaniak::createMailinglist()

[](#newsletterinfomaniakcreatemailinglist)

Create the `subscribers_fr` mailing list.

```
InfomaniakNewsletter::createMailinglist("subscribers_fr");
```

### NewsletterInfomaniak::updateMailinglist()

[](#newsletterinfomaniakupdatemailinglist)

Rename the `subscribers_fr` mailing list to `subscribers_french`.

```
InfomaniakNewsletter::updateMailinglist("subscribers_fr", "subscribers_french");
```

### NewsletterInfomaniak::deleteMailinglist()

[](#newsletterinfomaniakdeletemailinglist)

Delete the default list.

```
InfomaniakNewsletter::deleteMailinglist();
```

Delete the `subscribers_french` mailing list.

```
InfomaniakNewsletter::deleteMailinglist("subscribers_french");
```

### NewsletterInfomaniak::getTask()

[](#newsletterinfomaniakgettask)

Get information about the task `123456`.

```
InfomaniakNewsletter::getTask(123456);
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance47

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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 ~240 days

Recently: every ~272 days

Total

6

Last Release

393d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b70dca4d45fe5f427c2a10810c643723aabe33af789ea9578acfb9de0955e42?d=identicon)[apiaget](/maintainers/apiaget)

---

Top Contributors

[![apiaget](https://avatars.githubusercontent.com/u/634083?v=4)](https://github.com/apiaget "apiaget (18 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/karacweb-infomaniak-newsletter/health.svg)

```
[![Health](https://phpackages.com/badges/karacweb-infomaniak-newsletter/health.svg)](https://phpackages.com/packages/karacweb-infomaniak-newsletter)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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