/src/squirrelmail_rpc.php

Description

squirrelmail_rpc.php

This file contains the entry point to the "SquirrelMail API" -- the remote procedure call request receiver.

RPC requests are currently understood as simple HTTP GET or POST requests. The SquirrelMail default_rpc template set responds in a SOAP (currently v1.2) compliant manner, but this interface does not (yet?) understand SOAP requests. The format of responses can be changed by creating a different RPC template set and pointing to it with $rpc_templateset in the main SquirrelMail configuration file.

Includes
require ('../include/init.php') (line 61)

Include the SquirrelMail initialization file.

require_once (SM_PATH.'functions/mailbox_display.php') (line 146)

Delete Messages

require_once (SM_PATH.'functions/imap.php') (line 147)
Functions
sm_rpc_return_error (line 221)

Returns an error message to the RPC caller and exits

NOTE that this function exits and will never return

void sm_rpc_return_error ([string $rpc_action = NULL], int $error_code, [string $error_text = ''], [string $guilty_party = ''], [int $http_status_code = 0], [string $http_status_text = ''])
  • string $rpc_action: The RPC action that is being handled (OPTIONAL; default attempt to grab from GET/POST)
  • int $error_code: The (application-level) error code for the current error condition
  • string $error_text: Any error message associated with the error condition (OPTIONAL; default empty string)
  • string $guilty_party: A string indicating the party who caused the error: either "client" or "server" (OPTIONAL; default unspecified)
  • int $http_status_code: When non-zero, this value will be sent to the browser in the HTTP headers as the request status code (OPTIONAL; default not used)
  • string $http_status_text: A string naming the HTTP status, usually the title of the corresponding status code as found on: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html (OPTIONAL; default not used; $http_status_code must also be provided).
sm_rpc_return_success (line 259)

Returns a standard success result to the RPC caller and exits

NOTE that this function exits and will never return

void sm_rpc_return_success ([string $rpc_action = NULL], [int $result_code = 0], [string $result_text = ''])
  • string $rpc_action: The RPC action that is being handled (OPTIONAL; default attempt to grab from GET/POST)
  • int $result_code: The result code (OPTIONAL; default 0)
  • string $result_text: Any result message (OPTIONAL; default empty string)

Documentation generated on Mon, 13 Jan 2020 04:23:35 +0100 by phpDocumentor 1.4.3