PHPackages                             avido/smtpeter-php-api - 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. [API Development](/categories/api)
4. /
5. avido/smtpeter-php-api

ActiveLibrary[API Development](/categories/api)

avido/smtpeter-php-api
======================

Api client for smtpeter.com

0.0.7(3y ago)06961MITPHPPHP ^7.3 || ^8.0

Since Dec 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/avido/smtpeter-php-api)[ Packagist](https://packagist.org/packages/avido/smtpeter-php-api)[ Docs](https://github.com/avido/smtpeter-php-api)[ RSS](/packages/avido-smtpeter-php-api/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)Dependencies (5)Versions (9)Used By (1)

Smtpeter PHP Api Client
=======================

[](#smtpeter-php-api-client)

This release is not production ready yet.. use at own risk!

Requirements
------------

[](#requirements)

To use the smtpeter api client, the following things are required:

- A [Copernica account](https://www.copernica.com/)
- Generate your [API Key](https://www.smtpeter.com/nl/app/#/admin)

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

[](#installation)

You can install the package using composer.

```
composer require avido/smtpeter-php-api

```

Getting started
---------------

[](#getting-started)

Initialize the Smtpeter php api client and set your API key:

```
$client = new \Avido\Smtpeter\Client($apiKey);
```

### Templates

[](#templates)

#### List all templates

[](#list-all-templates)

Templates list results can be limit with an `offset` and `limit` variable

```
$templates = $client->templates->list();
$templatesWithLimit = $client->templates->list($offset, $limit);
```

#### Retrieve specific template

[](#retrieve-specific-template)

```
$template = $client->template->get($id);
```

### Emails

[](#emails)

#### Send out email using template

[](#send-out-email-using-template)

```
// simple email
$email = new Email([
    'templateId' => 1,
    'to' => 'receiver@domain.tld',
    'data' => ['array' => 'of replacement vars']
]);
// email with bcc
$email = new Email([
    'templateId' => 1,
    'to' => 'receiver@domain.tld',
    'bcc' => 'bcc@domain.tld',
    'data' => ['array' => 'of replacement vars']
]);
// email with replyTo address
$email = new Email([
    'templateId' => 1,
    'to' => 'receiver@domain.tld',
    'replyTo' => 'replyTo@domain.tld',
    'data' => ['array' => 'of replacement vars']
]);

$client->email->send($email);
```

#### Resend email

[](#resend-email)

```
$messageId = 'abcdef1234';
$client->email->resend($messageId   );
```

#### Retrieve email

[](#retrieve-email)

```
$messageId = 'abcdef1234';
// by default only the html body is retrieved.
$loadHtml = true;
$loadAttachments = true;
$loadHeaders = true;
$client->email->get($messageId, $loadHtml, $loadAttachments, $loadHeaders);
```

### Events

[](#events)

#### Get events for specific messageId

[](#get-events-for-specific-messageid)

```
$messageId = 'abcdef1234';
$events = $client->events->message($messageId);
// optional you can filter by date/ tags
$from = '2022-01-01';
$end = '2022-01-07';
$filterd = $client->events->message($messageId, $from, $end);
print_r($events);
...
Illuminate\Support\Collection Object
(
    [items:protected] => Array
        (
            [0] => Avido\Smtpeter\Resources\Event Object
             (
                [id] => abcdef1234
                [time] => DateTime Object
                    (
                        [date] => 2022-02-01 08:36:01.000000
                        [timezone_type] => 3
                        [timezone] => UTC
                    )

                [recipient] => recipient@domain.tld
                ...
             )
        )
)
```

For more examples see `tests` folder

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

Recently: every ~71 days

Total

7

Last Release

1273d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14986?v=4)[avido](/maintainers/avido)[@avido](https://github.com/avido)

---

Top Contributors

[![avido](https://avatars.githubusercontent.com/u/14986?v=4)](https://github.com/avido "avido (52 commits)")

---

Tags

phpapismtpeter

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/avido-smtpeter-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/avido-smtpeter-php-api/health.svg)](https://phpackages.com/packages/avido-smtpeter-php-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3633.0M18](/packages/kunalvarma05-dropbox-php-sdk)[resend/resend-php

Resend PHP library.

574.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

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