Skip to content

Commit

Permalink
修复普通邮件不能群发的bug (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
pihc authored and nauxliu committed Jun 22, 2019
1 parent 574974f commit 5569528
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SendCloudTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected function sendRawMessage(Swift_Mime_SimpleMessage $message)
$http = new Client();

$this->addQuery('html', $message->getBody() ?: '');
$this->addQuery('to', $this->getAddress($message->getTo()));
$this->addQuery('to', $this->getAddresses($message->getTo()));

$response = $http->post(self::SEND_HTML_URL, [
'multipart' => $this->query,
Expand All @@ -172,7 +172,7 @@ protected function sendTemplate(Swift_Mime_SimpleMessage $message)
$template = $message->getBody();
$this->addQuery('template_invoke_name', $template->getName());
$this->addQuery('substitution_vars', json_encode([
'to' => [$this->getAddress($message->getTo())],
'to' => [$this->getAddresses($message->getTo())],
'sub' => $template->getBindData(),
]));

Expand Down

0 comments on commit 5569528

Please sign in to comment.