public function addTo($to, $realName = null) { if ($this->to !== null) { $this->to .= ','; } if ($realName === null) { $this->to .= $to; } else { $this->to .= $realName . ' <' . $to . '>'; } return $this; }