phpCAS::serviceMail PHP Method

serviceMail() public static method

This method is used to access an IMAP/POP3/NNTP service.
public static serviceMail ( string $url, string $service, string $flags, &$err_code, &$err_msg, &$pt ) : object
$url string a string giving the URL of the service, including the mailing box for IMAP URLs, as accepted by imap_open().
$service string a string giving for CAS retrieve Proxy ticket
$flags string options given to imap_open().
return object IMAP stream on success, false otherwise (in this later case, $err_code gives the reason why it failed and $err_msg contains an error message).
    public static function serviceMail($url, $service, $flags, &$err_code, &$err_msg, &$pt)
    {
        phpCAS::traceBegin();
        phpCAS::_validateProxyExists();
        try {
            $res = self::$_PHPCAS_CLIENT->serviceMail($url, $service, $flags, $err_code, $err_msg, $pt);
        } catch (Exception $e) {
            phpCAS::error(get_class($e) . ': ' . $e->getMessage());
        }
        phpCAS::traceEnd($res);
        return $res;
    }