Archived
The quartzy/courier has moved to read-only.
A courier implementation for SendGrid.
See documentation for full details.
composer require camuthig/courier-sendgrid
<?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.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email a project maintainer instead of using the issue tracker.
The Apache License, v2.0. Please see License File for more information.