protected function getEmailBody() { $Params = Request::getGetData(); if (isset($Params->uid)) { $ImapServer = new Quickplan_ModelImapServer(); $body = $ImapServer->getEmailBody($Params->uid); $ImapServer->closeMailServerConnection(); echo $body; } else { echo "Email UID not set."; } }
public function closeMailServerConnection() { if (!isset(self::$_mailServerConnection)) { imap_close(self::$_mailServerConnection); self::$_mailServerConnection = null; } }