lukaszaleckas/mailpigeon-client-php

There is no license information available for the latest version (v1.0.0) of this package.

v1.0.0 2023-07-05 10:28 UTC

This package is auto-updated.

Last update: 2024-12-05 13:53:13 UTC


README

https://mailpigeon.io PHP Client

Installation

Run the following command to install the package through Composer:

composer require lukaszaleckas/mailpigeon-client-php

Usage

Sending email

use MailPigeon\MailPigeonClient;
use MailPigeon\MailPigeonApi;
use MailPigeon\DTOs\Request\SendEmailDto;

$client = new MailPigeonClient('<your provider secret / api key here>');
$api    = new MailPigeonApi($client);

$api->sendEmail(
    new SendEmailDto(
       'Jon Doe',
       'jon.doe@gmail.com',
       '<your campaign identifier here>',
       'en',
       [
           'some' => 'variable',
       ]
    )
);