// http://tools.ietf.org/html/rfc3501 function _imap_append($mailbox, $uid, $message, $flags, $internal_date) { if($this->put_line($this->tag . " APPEND $mailbox $flags $internal_date {".$uid."}" )) { $response_append=$this->get_server_responce(); if($response_append != '+ Ready for literal data') { $this->error= "Error : $response_append !
"; return false; } } else { $this->error= "Error : Could not send User request.
"; return false; } if($this->put_line($message)) { $response_sub=$this->get_server_responce(); if(substr($response_sub,strpos($response_sub,"$this->tag ")+strlen($this->tag)+1,2)!="OK") { $this->error= "Error : $response !
"; return false; } } else { $this->error= "Error : Could not send User request.
"; return false; } return true; }