2017 © Pedro Peláez
 

project mailgun-light

A light and minimalistic PHP client library for sending mails using Mailgun API.

image

eldadfux/mailgun-light

A light and minimalistic PHP client library for sending mails using Mailgun API.

  • Tuesday, May 22, 2018
  • by eldadfux
  • Repository
  • 1 Watchers
  • 3 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 14 % Grown

The README.md

Mailgun PHP Lite

Mailgun PHP Lite is a lite and minimalistic PHP client library for sending mails using Mailgun API with no external dependencies. This library was created to provide a very simple curl abstraction for sending mails using the Mailgun HTTP API. This is an alternative to those who need to just send simple mails and think the original PHP Client is to heavy for them and have a to much dependencies., (*1)

Installation

composer require 'eldadfux/mailgun-lite:1.3.*'

Example

$apiKey    = 'your-api-key-here';
$apiDomain = 'your-api-sending-domain-here';

$mailgun = new \MailgunLite\MailgunLite($apiKey, $apiDomain);

$mailgun
    ->setFrom('team@example.com', 'Team Example')
    ->setReplyTo('this@gmail.com') // (optional)
    ->setSchedule(strtotime('next Thursday')) // unix time stamp (optional)
    ->addRecipient('user1@example.com', 'User 1 Name')
    ->addRecipient('user2@example.com', 'User 2 Name')
    ->addRecipient('user3@example.com', 'User 3 Name')
    ->setSubject('Hello World')
    ->setText('I am a string')
    ->setHTML('<b>I am a string</b>')
;

// Send Mail
if(!$mailgun->send()) {
    throw new Exception('Problem sending mail: ' . $mailgun->getError());
}

// Subscribe to newsletter
$mailgun->subscribe('newsletter@example.com', 'user1@example.com');

Contributing

All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code., (*2)

Fork the project, create a feature branch, and send us a pull request., (*3)

Versioning

For transparency and insight into our release cycle, and for striving to maintain backward compatibility, This project will be maintained under the Semantic Versioning guidelines as much as possible. Releases will be numbered with the following format:, (*4)

<major>.<minor>.<patch>, (*5)

For more information on SemVer, please visit http://semver.org/., (*6)

Requirements

PHP 7+, (*7)

We recommend using the latest PHP version whenever possible., (*8)

Author

Eldad A. Fux, (*9)

License

This project is licensed under the MIT License - see the LICENSE file for details, (*10)

The Versions

22/05 2018

dev-master

9999999-dev https://github.com/eldadfux/mailgun-php-light

A light and minimalistic PHP client library for sending mails using Mailgun API.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

api light simple mailgun

16/10 2017

v1.1.0

1.1.0.0 https://github.com/eldadfux/mailgun-php-light

A light and minimalistic PHP client library for sending mails using Mailgun API.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

api light simple mailgun

28/01 2017

v1.0.1

1.0.1.0 https://github.com/eldadfux/mailgun-php-light

A light and minimalistic PHP client library for sending mails using Mailgun API.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

api light simple mailgun

28/01 2017

v1.0.0

1.0.0.0 https://github.com/eldadfux/mailgun-php-light

A light and minimalistic PHP client library for sending mails using Mailgun API.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

api light simple mailgun