Skip to content

Commit

Permalink
Fix a bug while sending multi emails. fix #18
Browse files Browse the repository at this point in the history
  • Loading branch information
nauxliu committed Apr 17, 2017
1 parent 4964125 commit d6da89a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/SendCloudTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class SendCloudTransport extends Transport

protected $query = [];

private $api_user;
private $api_key;

/**
* SendCloudTransport constructor.
*
Expand All @@ -28,8 +31,8 @@ class SendCloudTransport extends Transport
*/
public function __construct($api_user, $api_key)
{
$this->addQuery('api_user', $api_user);
$this->addQuery('api_key', $api_key);
$this->api_user = $api_user;
$this->api_key = $api_key;
}

/**
Expand All @@ -45,6 +48,8 @@ public function __construct($api_user, $api_key)
*/
public function send(Swift_Mime_Message $message, &$failedRecipients = null)
{
$this->addQuery('api_user', $this->api_user);
$this->addQuery('api_key', $this->api_key);
$this->addQuery('subject', $message->getSubject());
$this->addQuery('from', $this->getAddress($message->getFrom()));
$this->addQuery('fromname', $this->getFromName($message));
Expand Down

0 comments on commit d6da89a

Please sign in to comment.