[imp] Problem to set the default Prefs Fullname and From_address
Marc TURPIN
marc.turpin at aql.fr
Tue Mar 11 10:51:46 PST 2003
Hi,
I would like IMP get the default Fullname an From_address from my ldap.
Could you tell me how doing this ?
I uncoment in the imp/config/conf.php this and :
$conf['hooks']['from'] = '';
if (!function_exists('imp_expand_fromaddress')) {
function imp_expand_fromaddress($imp) {
$ldapServer = 'ldap.aql.fr';
$ldapPort = '389';
$searchBase = 'ou=people,o=aql,c=fr';
$ds = @ldap_connect($ldapServer, $ldapPort);
$searchResult = @ldap_search($ds, $searchBase, 'uid=' .
$imp['user']);
$information = @ldap_get_entries($ds, $searchResult);
$name = $information[0]['mail'][0];
ldap_close($ds);
return (empty($name) ? $imp['user'] : $name);
}
}
**************************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or the
sender immediately and do not disclose the contents to any one or make copies.
** Antivirus scanned this email for viruses, vandals and malicious content **
**************************************************************************************************
More information about the imp
mailing list