mailgun/mailgun-php — pull request #29 by travelton (2014-01-13 23:10:30+00:00)
Title: Ability to rename attachments and inline images.

This commit pushes the requirement for Guzzle up one point release to allow the ability to rename files. The SDK has been configured to take advantage of this new feature.

To send a message, and rename the files, use an array of arrays like the following example:

```
# First, instantiate the SDK with your API credentials and define your domain.
$mg = new Mailgun("key-example");
$domain = "example.com";

# Now, compose and send your message.
$mg->sendMessage($domain, array('from' => 'bob@example.com',
'to' => 'sally@example.com',
'subject' => 'The PHP SDK is awesome!',
'text' => 'It is so simple to send a message.'),
array(array('filePath' => '@/receipts/customer892374892.pdf',
'remoteName' => 'Receipt.pdf'),
array('filePath' => '@/taxforms/IRS/1099.pdf',
'remoteName' => 'IRS-1099.pdf')));
```

Alternatively, you can use MessageBuilder to handle this:

```
# Add an attachment
addAttachment('@/receipts/customer892374892.pdf', 'Receipt.pdf');

# Add an inline file
addInlineImage('@/taxforms/IRS/1099.pdf', 'IRS-1099.pdf');
```

This backward compatibility code should be removed in the next major release.