mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-24 21:46:02 +03:00
This commit is contained in:
parent
ef0c1b856a
commit
116fb33255
@ -22,7 +22,7 @@ composer and the Mailgun SDK.
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
# Add Mailgun as a dependency
|
||||
php composer.phar require mailgun/mailgun-php:~1.2
|
||||
php composer.phar require mailgun/mailgun-php:~1.3
|
||||
```
|
||||
|
||||
**For shared hosts without SSH access, check out our [Shared Host Instructions](SharedHostInstall.md).**
|
||||
|
@ -11,7 +11,7 @@ Linux / Mac OSX:
|
||||
*PHP is typically installed by default, consult your distribution documentation. Instructions from [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).*
|
||||
|
||||
1. curl -sS https://getcomposer.org/installer | php
|
||||
2. php composer.phar require mailgun/mailgun-php:~1.2
|
||||
2. php composer.phar require mailgun/mailgun-php:~1.3
|
||||
3. The files will be downloaded to your local computer.
|
||||
4. Upload the files to your webserver.
|
||||
|
||||
@ -20,7 +20,7 @@ Windows:
|
||||
*PHP must be installed on your computer, [download](http://windows.php.net/download/0). Instructions from [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-windows).*
|
||||
|
||||
1. Download and run [Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe).
|
||||
2. Open a Command Prompt and type "php composer require mailgun/mailgun-php:~1.2".
|
||||
2. Open a Command Prompt and type "php composer require mailgun/mailgun-php:~1.3".
|
||||
3. The files will be downloaded to your local computer.
|
||||
4. Upload the files to your webserver.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "mailgun/mailgun-php",
|
||||
"description": "The Mailgun SDK provides methods for all API functions.",
|
||||
"require": {
|
||||
"guzzle/guzzle": "3.7.1"
|
||||
"guzzle/guzzle": "3.7.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
|
@ -64,6 +64,9 @@ class MessageBuilder{
|
||||
if(isset($this->message[$headerName])){
|
||||
array_push($this->message[$headerName], $compiledAddress);
|
||||
}
|
||||
elseif($headerName == "h:reply-to"){
|
||||
$this->message[$headerName] = $compiledAddress;
|
||||
}
|
||||
else{
|
||||
$this->message[$headerName] = array($compiledAddress);
|
||||
}
|
||||
|
@ -38,6 +38,12 @@ class MessageBuilderTest extends \Mailgun\Tests\MailgunTestCase{
|
||||
$messageObj = $message->getMessage();
|
||||
$this->assertEquals(array("from" => array("'Test User' <test@samples.mailgun.org>")), $messageObj);
|
||||
}
|
||||
public function testSetReplyTo(){
|
||||
$message = $this->client->MessageBuilder();
|
||||
$message->setReplyToAddress("test@samples.mailgun.org", array("first" => "Test", "last" => "User"));
|
||||
$messageObj = $message->getMessage();
|
||||
$this->assertEquals(array("h:reply-to" => "'Test User' <test@samples.mailgun.org>"), $messageObj);
|
||||
}
|
||||
public function testSetSubject(){
|
||||
$message = $this->client->MessageBuilder();
|
||||
$message->setSubject("Test Subject");
|
||||
|
Loading…
Reference in New Issue
Block a user