Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.1.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
leeovery committed Sep 3, 2019
2 parents 29efca0 + 6cfc993 commit a2ef5c9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Very short description of the package
# Laravel Mail Driver For SendInBlue

[![Latest Version on Packagist](https://img.shields.io/packagist/v/leeovery/laravel-sendinblue.svg?style=flat-square)](https://packagist.org/packages/leeovery/laravel-sendinblue)
[![Build Status](https://img.shields.io/travis/leeovery/laravel-sendinblue/master.svg?style=flat-square)](https://travis-ci.org/leeovery/laravel-sendinblue)
[![Quality Score](https://img.shields.io/scrutinizer/g/leeovery/laravel-sendinblue.svg?style=flat-square)](https://scrutinizer-ci.com/g/leeovery/laravel-sendinblue)
[![Total Downloads](https://img.shields.io/packagist/dt/leeovery/laravel-sendinblue.svg?style=flat-square)](https://packagist.org/packages/leeovery/laravel-sendinblue)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
Mail driver for Laravel to send emails via the SendInBlue v3 API.

## Installation

Expand All @@ -17,8 +15,26 @@ composer require leeovery/laravel-sendinblue

## Usage

To use this driver simply set the following config in your `/config/services.php` file as follows:

``` php
// Usage description here

'sendinblue' => [
'secret' => env('SENDINBLUE_SECRET'),

// optionally provide this but will default to whats specified here...
'options' => [
'endpoint' => 'https://api.sendinblue.com/v3',
],
],

```

Add the following to your env with your SendInBlue v3 API key:

```
SENDINBLUE_SECRET={your SendInBlue v3 API key goes here}
MAIL_DRIVER=sendinblue
```

### Testing
Expand Down Expand Up @@ -50,4 +66,4 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio

## Laravel Package Boilerplate

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).
This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"require": {
"php": "^7.1",
"guzzlehttp/guzzle": "^6.3",
"illuminate/support": "5.8.*",
"illuminate/support": "5.8.*|^6.0.0",
"sendinblue/api-v3-sdk": "^6.1"
},
"require-dev": {
"orchestra/testbench": "3.8.*",
"orchestra/testbench": "3.8.*|^4.0.0",
"phpunit/phpunit": "^7.0"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions src/SendInBlueTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ private function buildPayload(Swift_Mime_SimpleMessage $message, $recipients): S
'email' => key($from),
],
'to' => $recipients['to'],
'cc' => $recipients['cc'] ?? [],
'bcc' => $recipients['bcc'] ?? [],
'cc' => $recipients['cc'] ?? null,
'bcc' => $recipients['bcc'] ?? null,
'htmlContent' => $message->getBody(),
//'textContent' => '',
'subject' => $message->getSubject(),
Expand Down

0 comments on commit a2ef5c9

Please sign in to comment.