[imp] How to use imp_get_vinfo

eculp at encontacto.net eculp at encontacto.net
Thu May 1 19:52:54 PDT 2003


Quoting "eculp at encontacto.net" <eculp at encontacto.net>:

| Quoting Thomas O'Brien <thomas at creativebusinessystems.com>:
|
| | Ed,
| |
| | I have changed back to $conf['hooks']['vinfo'] = 'imp_get_vinfo';
| |
| |
| | Line 366      if ($type == 'username') {
| | Line 367           return $_SESSION['imp']['user'] . '@' . $vdomain;
|
| Unfortunately, I can't test anything that I am suggesting because I
| don't have a corresponding horde/IMP version configured and don't
| even have access to a Windows machine.  Could there be an issue with
| the $_SESSION['imp']['user'] variable on your windows apache?  If
| you are using apache, try changing line 367 to:
|
|            return Auth::getAuth() . '@' . $vdomain;

I'm groping for straws.  The above shouldn't work.  The $_SESSION['imp']
['user'] doesn't seem to exist from what you have said and since I can't
test it, I don't see how I can help any more.  Hopefully someone else
on the list has a setup similar to yours with windows and can do a better
job.


IMO, what your horde/imp/conf.php vinfo hook should now look like the
following;

$conf['hooks']['vinfo'] = 'imp_get_vinfo';

if (!function_exists('imp_get_vinfo')) {
     function imp_get_vinfo ( $type ='username') {
        global $conf, $imp;
        $vdomain = strtolower(preg_replace('/^mail\.|^www\.|^www\.mail\./i', '',
$_SERVER['HTTP_HOST']));
         if ($type == 'username') {
             return $_SESSION['imp']['user'] . '@' . $vdomain;
        } elseif ($type == "vdomain") {
            return $vdomain;
        } else {
            return new PEAR_Error('invalid type: ' . $type);
        }
    }
}

Hopefully someone with a working Windows implementation can help you find
why you are getting the following errors:

| Notice: Undefined index: imp in
| c:\inetpub\wwwroot\horde\imp\config\conf.php on line 367

Line 376 is:

return $_SESSION['imp']['user'] . '@' . $vdomain;

and your imap is returning the '@sk82win.com' but without having
concatenated the $_SESSION['imp']['user'] to the '@sk82win.com'
which confirms the above line 367 notice.

I have only one more idea.  I'm probably missing something very basic.

Do you get any errors with http://www.sk82win.com/webmail/horde/test.php
our whatever the correct url to get horde/test.php would be?  Do you
have everything that isn't compiled into php and PEAR libraries correct?


ed


-------------------------------------------------



More information about the imp mailing list