2017 © Pedro Peláez
 

library sendinblue-api

Make sendinblue api simple to use

image

scoringline/sendinblue-api

Make sendinblue api simple to use

  • Tuesday, March 14, 2017
  • by Nek
  • Repository
  • 11 Watchers
  • 2 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Sendinblue API

Build Status, (*1)

Clean and simple to use lib for use Sendinblue API., (*2)

  • [x] tested
  • [x] stable
  • [x] extensible

For now the only API available is the SMS api, more is coming later, PRs accepted with love., (*3)

Installation

Requirements:, (*4)

  • PHP 5.4+
  • composer

Launch the following command to install:, (*5)

$ composer require scoringline/sendinblue-api

Authentication

<?php

require 'vendor/autoload.php';

use Scoringline\SendinblueApi\Sendinblue;

$sendinblue = new Sendinblue();

$sendinblue->useAuthentication('ApiKey', ['key' => 'YourPrivateApiKey']);

SMS Api usage

<?php

require 'vendor/autoload.php';

use Scoringline\SendinblueApi\Sendinblue;

$sendinblue = new Sendinblue();

$sendinblue->getSmsApi()->sendSms('+33600000000', 'Your name', 'The message you want to send');

Email Api usage

<?php

require 'vendor/autoload.php';

use Scoringline\SendinblueApi\Sendinblue;
use Scoringline\SendinblueApi\Model\Email;
use Symfony\Component\HttpFoundation\File\File;

$sendinblue = new Sendinblue();

// Send basic email without model    
$sendinblue
    ->getEmailApi()
    ->sendSimpleEmail(
        ['from@example.com', 'from name!'], 
        ['to@example.com' => 'to name!'], 
        'Subject', 
        '

Html

message you want to send' ) ; // Send basic email with array data $params = [ 'to' => ['to@example.com' => 'to name!'], 'from' => ['from@example.com', 'from name!'], 'subject' => 'Subject', 'html' => '

Html

message you want to send' ]; $email->getEmailApi()->sendEmailWithData($params); // Send advance email with attachment $file = new File('fixtures/test.txt'); $email = new Email($sendinblue->getEmailApi()); $email ->setTo(['to@example.com' => 'to name!']) ->setFrom(['from@example.com', 'from name!']) ->setSubject('Subject') ->setText('Option text') ->setHtml('

Html

message you want to send') ->setAttachments(['fixtures/logo.png', $file]) ->setInlineImages(['fixtures/logo.png', 'fixtures/logo_one.png']) ; $sendinblue->getEmailApi()->sendEmail($email); // Send advance email with cc, bcc etc $email ->setTo(['to@example.com' => 'to name!']) ->setFrom(['from@example.com', 'from name!']) ->setSubject('Invitation') ->setText('You are invited for giving test'); ->setHtml('This is the

HTML

') ->setReplyTo(['replyto@example.com', 'replyto name']) ->setCc(['cc@example.com' => 'cc name']) ->setBcc(['bcc@example.com' => 'Bcc name']) ; $sendinblue->getEmailApi()->sendEmail($email);

This library is provided to you by Scoringline, if you're searching for more efficient hiring, checkout our application !, (*6)

The Versions

14/03 2017

dev-master

9999999-dev

Make sendinblue api simple to use

  Sources   Download

MIT

The Requires

 

The Development Requires

api sendinblue

05/12 2016

dev-feature/email-api

dev-feature/email-api

Make sendinblue api simple to use

  Sources   Download

MIT

The Requires

 

The Development Requires

api sendinblue

25/08 2016

1.0.2

1.0.2.0

Make sendinblue api simple to use

  Sources   Download

MIT

The Requires

 

The Development Requires

api sendinblue

07/07 2016

1.0.1

1.0.1.0

Make sendinblue api simple to use

  Sources   Download

MIT

The Requires

 

The Development Requires

api sendinblue

17/10 2015

1.0.0

1.0.0.0

Make sendinblue api simple to use

  Sources   Download

MIT

The Requires

 

The Development Requires

api sendinblue