public function send(Swift_Mime_Message $message, &$failedRecipients = null)
{
$this->addQuery('subject', $message->getSubject());
$this->addQuery('from', $this->getAddress($message->getFrom()));
$this->addQuery('fromname', $this->getFromName($message));
$this->addQuery('replyto', $this->getAddress($message->getReplyTo()));
$this->addQuery('cc', $this->getAddresses($message->getCc()));
$this->addQuery('bcc', $this->getAddresses($message->getBCc()));
// 附件
if (!empty($message->getChildren())) {
foreach ($message->getChildren() as $file) {
$this->addQuery('files[]', $file->getBody(), $file->getFilename());
}
}
$this->query = array_filter($this->query);
$body = $message->getBody();
if ($body instanceof SendCloudTemplate) {
$this->sendTemplate($message);
} else {
$this->sendRawMessage($message);
}
}