camuthig / courier-sendgrid

An adapter for sending emails through SendGrid with Courier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

An adapter for sending emails through SendGrid with Courier

License:Other


Languages

Language:PHP 99.7%Language:Shell 0.3%