camuthig/courier-sendgrid

This package is abandoned and no longer maintained. No replacement package was suggested.

An adapter for sending emails through SendGrid with Courier

0.3.0 2018-12-29 00:46 UTC

This package is auto-updated.

Last update: 2022-11-28 05:32:01 UTC


README

Archived

The quartzy/courier has moved to read-only.

Courier

Latest Version on Packagist Total Downloads Software License Build Status Coverage Status Style Status Scrutinizer Code Quality

A courier implementation for SendGrid.

See documentation for full details.

Install

Via Composer

composer require camuthig/courier-sendgrid

Usage

<?php

use Courier\SendGridCourier;
use PhpEmail\EmailBuilder;
use PhpEmail\Content\SimpleContent;

$key     = getenv('SENDGRID_KEY');
$courier = new SendGridCourier(new \SendGrid($key));

$email = EmailBuilder::email()
    ->withSubject('Welcome!')
    ->withContent(SimpleContent::text('Start your free trial now!!!'))
    ->from('me@test.com')
    ->to('you@yourbusiness.com')
    ->build();

$courier->deliver($email);

For details on building the email objects, see Php Email.

Change log

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email a project maintainer instead of using the issue tracker.

Credits

License

The Apache License, v2.0. Please see License File for more information.