mailer.php
public function send($subject,$mock=false,$log='verbose') {
		foreach ($this->recipients as $key => $rcpts) {
			$mails = array();
			foreach ($rcpts as $mail=>$title)
				$mails[] = $this->buildMail($mail,$title);
			$this->set($key,implode(', ',$mails));
		}
		$this->smtp->set('Subject', $this->encodeHeader($this->encode($subject)));
		$body = '';
		$hash=uniqid(NULL,TRUE);
		$multipart = count($this->message) > 1;
		if ($multipart)
			$this->smtp->set('Content-Type', 'multipart/alternative; boundary="'.$hash.'"');
		$i=0;
		foreach ($this->message as $msg) {
			if ($multipart) {
				$body .= '--'.$hash.static::$EOL;
				$body .= 'Content-Type: '.$msg['type'].static::$EOL.static::$EOL;
			} else
				$this->smtp->set('Content-Type', $msg['type']);
			$body .= $msg['content'].static::$EOL.static::$EOL;
		}
		if ($multipart)
			$body .= '--'.$hash.'--'.static::$EOL;
		$success = $this->smtp->send($this->encode($body),$log,$mock);
		$f3 = \Base::instance();
		if (!$success && $f3->exists('mailer.on.failure',$fail_handler))
			$f3->call($fail_handler,array($this,$this->smtp->log()));
		return $success;
	}
public function send($subject,$mock=false,$log='verbose') {
		foreach ($this->recipients as $key => $rcpts) {
			$mails = array();
			foreach ($rcpts as $mail=>$title)
				$mails[] = $this->buildMail($mail,$title);
			$this->set($key,implode(', ',$mails));
		}
		$this->smtp->set('Subject', $this->encodeHeader($this->encode($subject)));
		$body = '';
		$hash=uniqid(NULL,TRUE);
		$multipart = count($this->message) > 1;
		if ($multipart)
			$this->smtp->set('Content-Type', 'multipart/alternative; boundary="'.$hash.'"');
		$i=0;
		foreach ($this->message as $msg) {
			if ($multipart) {
				$body .= '--'.$hash.static::$EOL;
				$body .= 'Content-Type: '.$msg['type'].static::$EOL.static::$EOL;
			} else
				$this->smtp->set('Content-Type', $msg['type']);
			$body .= $msg['content'].static::$EOL.static::$EOL;
		}
		if ($multipart)
			$body .= '--'.$hash.'--'.static::$EOL;
		$success = $this->smtp->send($this->encode($body),$log,$mock);
		$f3 = \Base::instance();
		if (!$success && $f3->exists('mailer.on.failure',$fail_handler))
			$f3->call($fail_handler,array($this,$this->smtp->log()));
		return $success;
	}
send message
@param $subject
@param bool $mock
@param bool|string $log log level [false,true,'verbose']
@return bool