API wrapper to connect with a standalone Mailcoach server.
rubenbuijs/mailcoach-api-wrapper is a Laravel package for api wrapper to connect with a standalone mailcoach server..
It currently has 4 GitHub stars and 222 downloads on Packagist.
Install it with composer require rubenbuijs/mailcoach-api-wrapper.
Discover more Laravel packages by rubenbuijs
or browse all Laravel packages to compare alternatives.
Last updated
This is an API wrapper for Spatie's Mailcoach. Use this package when you have installed Mailcoach on a standalone server - separate from your app. I favored the standalone instance because it reduced dependencies in my apps.
A prerequisite is that you have installed Mailcoach as a standalone app.
You can install this package via composer:
composer require rubenbuijs/mailcoach-api-wrapper
MAILCOACH_API_BASE_URL=https://yourdomain.com/api
MAILCOACH_API_TOKEN=1|XXXXXXXXXXXXXXXXXXXXXXX # Mailcoach installation: Config->API Tokens
MAILCOACH_LIST_ID=1
MAILCOACH_SSL=false
After installation, the Newsletter class is available to interact with your Mailcoach server.
Newsletter::subscribe(string $email, string $name, array $tags = [])
Enter NULL when you don't want to make changes to the email, name, or tags.
Newsletter::update(string $email, string $new_email = null, string $name = null, array $tags = null)
Newsletter::addTags(string $email, array $tags_to_add)
Newsletter::deleteTags(string $email, array $tags_to_delete)
Newsletter::getSubscriberByEmail(string $email)
Take a look at my products: