Skip to content

Commit

Permalink
Docmail for Laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
vagrant committed Sep 10, 2015
0 parents commit d56a427
Show file tree
Hide file tree
Showing 11 changed files with 2,061 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Laravel Package for Docmail
This packages provides an interface to the mail services of [Docmail](https://www.cfhdocmail.com/). The provide their services in many countries and are able to process mailings at fair rates.

## Installing the package
Open your ```config/app.php``` file and add the following service provider:

```
\Hpolthof\Docmail\DocmailServiceProvider::class,
```

Then add the following facade to your list of aliases:

```
'Docmail' => \Hpolthof\Docmail\DocmailFacade::class,
```

## Usage

```
\Docmail::sendFile(storage_path('temp/test.pdf'), function(\Hpolthof\Docmail\DocmailService $docmail) {
// Name the mailing, defaults to the OrderRef.
$docmail->getMailing()->setMailingName('Test Mailing');
// Change the filename.
$docmail->getTemplate()->setFileName('MyPrettyLetterFilename.pdf');
// Add all the addresses you want.
$docmail->addBasicAddress('John Doe', 'Testersroad 3', '32444 Testersvalley');
// If you have a discountcode you can apply it.
$docmail->getMailing()->setDiscountCode('');
});
```
33 changes: 33 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "hpolthof/laravel-docmail",
"description": "An laravel implementation for Docmail.",
"keywords": [
"laravel", "docmail"
],
"homepage": "https://github.com/hpolthof/laravel-docmail",
"license": "MIT",
"authors": [
{
"name": "Paul Olthof",
"email": "hpolthof@gmail.com",
"homepage": "https://github.com/hpolthof",
"role": "Developer"
}
],
"require": {
"php" : ">=5.4.0",
"illuminate/support": "~5.1",
"fergusean/nusoap": "0.9.5"
},
"autoload": {
"psr-4": {
"Hpolthof\\Docmail\\": "src"
}
},
"minimum-stability": "stable",
"extra": {
"branch-alias": {
"dev-master": "0.1.x-dev"
}
}
}
Loading

0 comments on commit d56a427

Please sign in to comment.