public function send(Message $message)
	{
		$content = $message->generateMessage();

		preg_match('~Message-ID: <(?<message_id>\w+)[^>]+>~', $content, $matches);

		$path = $this->tempDir . '/'. $this->prefix . $matches['message_id'] . '.' . self::FILE_EXTENSION;
		if (($bytes = file_put_contents($path, $content)) === FALSE) {
			throw new InvalidStateException("Unable to write email to '$path'.");
		}

		return $bytes;
	}