Skip to content
No description, website, or topics provided.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Minutemailer
.gitignore
README.md
composer.json

README.md

Minutemailer API PHP Library

This library allows you to quickly get started with the Minutemailer API via PHP. Libraries for other languages will come soon.

Before you get started, read the API documentation.

Installation

$ composer require minutemailer/api or download the php-file Minutemailer.php if you are not using composer.

Usage

First you need to create an API token. You can do so by logging in to your Minutemailer account and go to the API settings page.

Make sure the file is loaded, either by require 'vendor/autoload.php' if you are using composer or require 'path/Minutemailer.php' if you are not.

<?php

require 'vendor/autoload.php';

$personalAccessToken = 'myAccessToken';

$client = new Minutemailer\Minutemailer($personalAccessToken);
$response = $client->contact_lists('123abc')->subscribe([
    'name'  => 'Firstname Lastname',
    'email' => 'validemail@domain.com'
]);

Email is required and name is optional. $response will be filled with the contact data if the request is valid. Otherwise, an error will be returned.

You can’t perform that action at this time.