public function smtpClose() { if (!is_null($this->smtp)) { if ($this->smtp->connected()) { $this->smtp->quit(); $this->smtp->close(); } } }