Kaynağa Gözat

Add function sqimap_run_command which combines sending and receiving a
message, ready for changes to other code which uses it.

Bron Gondwana 23 yıl önce
ebeveyn
işleme
fe30258212
1 değiştirilmiş dosya ile 11 ekleme ve 0 silme
  1. 11 0
      functions/imap_general.php

+ 11 - 0
functions/imap_general.php

@@ -33,6 +33,17 @@ function sqimap_session_id() {
     return( $IMAPSessionID );
 }
 
+/******************************************************************************
+** Both send a command and accept the result from the command.  This is
+** to allow proper session number handling.
+******************************************************************************/
+
+function sqimap_run_command ($imap_stream, $query, $handle_errors, &$response, &$message) {
+    fputs ($imap_stream, sqimap_session_id() . $query . "\r\n");
+    $read = sqimap_read_data ($imap_stream, sqimap_session_id(), $handle_errors, $response, $message);
+    return $read;
+}
+
 
 /******************************************************************************
 **  Reads the output from the IMAP stream.  If handle_errors is set to true,