Skip to content

Commit

Permalink
Updated README.md [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
zanderwar committed Feb 1, 2018
1 parent e503f63 commit e299917
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,23 @@ $sendGrid->addRecipient('[email protected]', 'Reece Alexander', [
]);
$sendGrid->setBody("<p>We thought you'd like this awesome t-shirt!</p>");
$sendGrid->setTemplateId('your-template-id');
$sendGrid->addAttachment(Image::get()->first());
$sendGrid->send();
```

You can add as many recipients as you want.

### Attachments
You can add as many attachments you want totalling up to 30 MB. The attachment must be a `File` subclass such as itself or `Image`.

```php
$file = Image::get()->first();
$sendGrid->addAttachment($file, $filename = null, $forcePublish = false);
```

If you provide `$filename`, make sure you provide the correct extension as well to prevent any errors

If you provide `$forcePublish` if the `File` you have provided has not be published, it will be forcibly published

## License
[BSD-3-Clause](LICENSE.md) - [Vulcan Digital Ltd](https://vulcandigital.co.nz)

0 comments on commit e299917

Please sign in to comment.