[imp] Gettting From address from sql db

Gennaro gennaro at snet.net
Tue Dec 31 09:12:03 PST 2002


Any help on this would be appreciated

I am trying to pull the from address from an sql db  I have written the following in /imp/config/conf.php

$conf['hooks']['from'] = 'imp_expand_fromaddress';

if (!function_exists('imp_expand_fromaddress')) {
 function imp_expand_fromaddress($imp) {
$db = mysql_connect("localhost", "username", "password");
mysql_select_db("maildb",$db);
$sql = "select address from users where id = '$imp['user']'";
$result = mysql_query($sql,$db);
$name = mysql_result($result,0,"address");
return (empty($name) ? $imp['user'] : $name);
    }
 }
But when I try to connect to the server I get

Notice: Undefined index: alternate_login in /home/www/default/horde/imp/login.php on line 90

Notice: Undefined index: server in /home/www/default/horde/imp/login.php on line 136

  
      
      

  Notice: Undefined index: server in /home/www/default/horde/imp/templates/login/login.inc on line 80

  Notice: Undefined index: server in /home/www/default/horde/imp/templates/login/login.inc on line 83

  Notice: Undefined index: server in /home/www/default/horde/imp/templates/login/login.inc on line 89
          
    Notice: Undefined index: server in /home/www/default/horde/imp/templates/login/login.inc on line 127
     



More information about the imp mailing list