<commit_before>###Laravel 4 Package to integrate with multiple Cloud Email Providers

####Email Providers Supported
- [Installation](#install)
- [Mandrill](https://www.mandrillapp.com) - ([Documentation](#mandrill))
  - [Sending Email using Mandrill](#send-mandrill)
  - [Queuing Email using Mandrill](#queue-mandrill)
  - [Sending Email at a given Time](#send-mandrill-time)
  - [Sending Email to a Batch of recipients](#send-mandrill-batch)
  - [Sending Email to a Batch of recipients at a given time](#send-mandrill-batch-time)
  - [Passing the credentials dynamically for Mandrill](#credentials-mandrill)
  - [Methods](#methods-mandrill)
- [PostmarkApp](http://www.postmarkapp.com) - In Progress

###Installation<a name="install"></a>
Add abishekrsrikaanth/mailto as a requirement to composer.json:
```
{
    ...
    "require": {
        ...
        "abishekrsrikaanth/mailto": "dev-master"
        ...
    },
}
```
Update composer:
```
$ php composer.phar update
```
Add the provider to your app/config/app.php:
```
'providers' => array(
    ...
    'Abishekrsrikaanth\Mailto\MailtoServiceProvider',
),
```
and the Facade info on app/config/app.php
```
'aliases'   => array(
	...
	'MailTo'      => 'Abishekrsrikaanth\Mailto\Facades\Mailto',
),
```
Publish Configuration
```
php artisan config:publish abishekrsrikaanth/mailto
```

###Mandrill
<a name="mandrill"></a>
#####Sending Email using Mandrill <a name="send-mandrill"></a>
```
$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->send();
```

#####Queuing Email using Mandrill<a name="queue-mandrill"></a>
```
$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->queue();
```

####Sending Email at a given Time<a name="send-mandrill-time"></a>
```
$timestamp = new DateTime('+1 hour');

$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->send($timestamp);
```

####Sending Email to a Batch of recipients<a name="send-mandrill-batch"></a>
```
$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->sendBatch();
```

####Sending Email to a Batch of recipients at a given time<a name="send-mandrill-batch-time"></a>
```
$timestamp = new DateTime('+1 hour');

$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->sendBatch($timestamp);
```

####Passing the credentials dynamically for Mandrill<a name="credentials-mandrill"></a>
```
$mandrill = MailTo::Mandrill(array('apikey'=>'MADRILL_API_KEY'));
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->send();
```
####Methods<a name="nethods-mandrill"></a>
<table>
  <tr>
    <th>Method</th><th>Explanation</th>
  </tr>
  <tr>
    <td>Mandrill($credentials)</td>
    <td>Constructor will initialize the API Key. If no credentials is passed, the credentials will be picked from the config file</td>
  </tr>
  <tr>
    <td>addRecipient($email,$name)</td>
    <td>Adds a Recipient for the Email. Multiple Recipients can be added by calling this function again</td>
  </tr>
  <tr>
    <td>setHtml($html)</td>
    <td>Sets the HTML Content for the Email</td>
  </tr><commit_msg>fixed link for mandrill methods<commit_after>###Laravel 4 Package to integrate with multiple Cloud Email Providers

####Email Providers Supported
- [Installation](#install)
- [Mandrill](https://www.mandrillapp.com) - ([Documentation](#mandrill))
  - [Sending Email using Mandrill](#send-mandrill)
  - [Queuing Email using Mandrill](#queue-mandrill)
  - [Sending Email at a given Time](#send-mandrill-time)
  - [Sending Email to a Batch of recipients](#send-mandrill-batch)
  - [Sending Email to a Batch of recipients at a given time](#send-mandrill-batch-time)
  - [Passing the credentials dynamically for Mandrill](#credentials-mandrill)
  - [Methods](#methods-mandrill)
- [PostmarkApp](http://www.postmarkapp.com) - In Progress

###Installation<a name="install"></a>
Add abishekrsrikaanth/mailto as a requirement to composer.json:
```
{
    ...
    "require": {
        ...
        "abishekrsrikaanth/mailto": "dev-master"
        ...
    },
}
```
Update composer:
```
$ php composer.phar update
```
Add the provider to your app/config/app.php:
```
'providers' => array(
    ...
    'Abishekrsrikaanth\Mailto\MailtoServiceProvider',
),
```
and the Facade info on app/config/app.php
```
'aliases'   => array(
	...
	'MailTo'      => 'Abishekrsrikaanth\Mailto\Facades\Mailto',
),
```
Publish Configuration
```
php artisan config:publish abishekrsrikaanth/mailto
```

###Mandrill
<a name="mandrill"></a>
#####Sending Email using Mandrill <a name="send-mandrill"></a>
```
$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->send();
```

#####Queuing Email using Mandrill<a name="queue-mandrill"></a>
```
$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->queue();
```

####Sending Email at a given Time<a name="send-mandrill-time"></a>
```
$timestamp = new DateTime('+1 hour');

$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->send($timestamp);
```

####Sending Email to a Batch of recipients<a name="send-mandrill-batch"></a>
```
$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->sendBatch();
```

####Sending Email to a Batch of recipients at a given time<a name="send-mandrill-batch-time"></a>
```
$timestamp = new DateTime('+1 hour');

$mandrill = MailTo::Mandrill();
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->sendBatch($timestamp);
```

####Passing the credentials dynamically for Mandrill<a name="credentials-mandrill"></a>
```
$mandrill = MailTo::Mandrill(array('apikey'=>'MADRILL_API_KEY'));
$mandrill->addRecipient($email, $name)
         ->setFrom($email, $name)
         ->setHtml($html)
         ->setText($text)
         ->setSubject($subject)
         ->send();
```
####Methods<a name="methods-mandrill"></a>
<table>
  <tr>
    <th>Method</th><th>Explanation</th>
  </tr>
  <tr>
    <td>Mandrill($credentials)</td>
    <td>Constructor will initialize the API Key. If no credentials is passed, the credentials will be picked from the config file</td>
  </tr>
  <tr>
    <td>addRecipient($email,$name)</td>
    <td>Adds a Recipient for the Email. Multiple Recipients can be added by calling this function again</td>
  </tr>
  <tr>
    <td>setHtml($html)</td>
    <td>Sets the HTML Content for the Email</td>
  </tr>
{'fraction_non_alphanumeric': 0.18515625, 'fraction_numerical': 0.00078125, 'mean_word_length': 3.483946293053123, 'pattern_counts': {'":': 4, '<': 89, '<?xml version=': 0, '>': 169, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '438820', 'n_tokens_mistral': 2686, 'n_tokens_neox': 2492, 'n_words': 551}