axazara/mailbluster-laravel

This is simple PHP Package for Laravel to interact with MailBluster API.

v0.1 2023-11-06 04:57 UTC

This package is auto-updated.

Last update: 2024-06-06 06:23:02 UTC


README

Pipeline Status Coverage Latest Version on Packagist Total Downloads License: MIT

This is simple laravel package to interact with MailBluster API.

MailBluster::createLead('lead@exemple.com') // To create a lead

Installation

You can install the package via composer:

composer require axazara/mailbluster-laravel

You must publish the config file with:

php artisan mailbluster:install

This is the contents of the published config file:

return [
    'api_url' => env('MAILBLUSTER_API_URL', 'https://api.mailbluster.com/api'),
    'api_key' => env('MAILBLUSTER_API_KEY', ''),
];

Setup

To use the MailBluster API, you need to set the MAILBLUSTER_API_KEY environment variables in your .env file.

MAILBLUSTER_API_KEY=MAILBLUSTER_API_KEY_HERE
  • MAILBLUSTER_API_URL you can get this from MailBluster API doc.
  • MAILBLUSTER_API_KEY you can get this from your MailBluster account dashboard.

IMPORTANT

  • Save your API key as an environment variable in your .env file. Do not hardcode it in your code.
  • You must not share your API key with anyone.
  • You must not commit your API key to version control.

Usage

This package provides a facade to interact with MailBluster API.

Lead

Read leads docs docs

Fields

Read fields docs docs

Products

Read products docs docs

Contribution

You can contribute to this package by forking the repository and submitting a pull request to the dev-main branch.

Local Development

To avoid error in local development or testing environment you can set the MAILBLUSTER_API_URL environment variable to test in your .env file, this will prevent package to send email to MailBluster API. ⚠️Be sure to set the MAILBLUSTER_API_URL environment variable to the correct value when deploying to production.

Credits

Copyright

MailBluster is not affiliated with Axa Zara. All rights reserved.

License

The MIT License (MIT). Please see License File for more information.