public function send(Message $message) { $messageFile = $this->getFilePath($message->getTo()); \common_Logger::d('Wrote message to ' . $messageFile); $written = file_put_contents($messageFile, $message->getBody()); return $written !== false; }
public function send(Message $message) { $receiver = $message->getTo(); $path = $this->getOption(self::CONFIG_FILEPATH) . \tao_helpers_File::getSafeFileName($receiver->getIdentifier()) . DIRECTORY_SEPARATOR; if (!file_exists($path)) { mkdir($path); } $messageFile = $path . \tao_helpers_File::getSafeFileName('message.html', $path); \common_Logger::d($messageFile); $written = file_put_contents($messageFile, $message->getBody()); return $written !== false; }