public function string_attach($contents, $filename, $cid = null, $inline = false, $mime = null)
	{
		$disp = ($inline) ? 'inline' : 'attachment';
		$cid = empty($cid) ? 'cid:'.md5($filename) : trim($cid);
		$cid = strpos($cid, 'cid:') === 0 ? $cid : 'cid:'.$cid;
		$mime or $mime = static::attachment_mime($filename);

		$this->attachments[$disp][$cid] = array(
			'file' => array(1 => $filename),
			'contents' => static::encode_string($contents, 'base64', $this->config['newline']),
			'mime' => $mime,
			'disp' => $disp,
			'cid' => $cid,
		);

		return $this;
	}