[imp] imp_expand_fromaddress function

emmanuelbiennier at virtualvercors.net emmanuelbiennier at virtualvercors.net
Wed Mar 23 06:40:40 PST 2005


So sorry for my poor english !
I try to install Horde/imp but I have a problem with user's login
First we have mail adress like this : user at domainname.tld

My provider give me login in this form :

user.domainname

when I log in Horde/imp, and I want to compose mail, my identity is :

user.domainname at domainname.tld

So I try to modified imp_expand_fromaddress function but all I do doesn't 
works
For example I try :


$conf['hooks']['from'] = 'imp_expand_fromaddress';
$num = '@';
$imp['user'] = ereg_replace('.domainname', $num, $imp['user']); 
if (!function_exists('imp_expand_fromaddress')) {
     function imp_expand_fromaddress ($imp) {
         if ($imp['server'] != '') {
             return $imp['user'];
         }

$cmd = '/usr/local/bin/ph unix=' . escapeShellCmd($imp['user']) . ' | 
/bin/grep email | /usr/bin/awk \'{print $2}\'';
        $name = `$cmd`;
        return (empty($name) ? $imp['user'] : $name);
     }
 }


So if someone could help me !

PS : I hope that you understand my problem !!




More information about the imp mailing list