[imp] Personal Information

Otto Stolz Otto.Stolz at uni-konstanz.de
Mon Dec 3 10:34:30 UTC 2007


Hello Andrea Soracchi,

You have written:
> when a user logs into Horde for the first time (with IMP/IMAP
> authentication), it's possible to automatically fill the following Personal
> Information:
>      - "Your From: address:"
>      - "Your Reply-to: address:"
> reading from a SQL server table...

The From address can be supplied via the _prefs_hook_from_addr
function, which you would have to write in PHP. That function
must be declared in horde/config/hooks.php; I guess there is
an example, in horde/config/hooks.php.dist.

The function is activated in the horde/config/prefs.php file.
If it is activated, it will be called several times during
the login, and the logout, processing -- mostly with an
empty argument. When the argument is empty, the function
should just return with an empty result. However, when the
argument is not empty, it contains a Horde user-id; in this
case, the function is supposed to yield the mail address of
the pertinent user, to be used in the From field of out-
going messages.

Likewise, you can have a _prefs_hook_fullname function
to provide the user's full name (aka common name) for the
 From field of outgoing messages.

For the Reply-to address, I recommend to specify, in
horde/imp/config/prefs.php (note the "imp", in this path):
> $_prefs['replyto_addr'] = array(
>     'value' => '',
>     'locked' => true,
...

This will suppress the Reply-to field, in outgoing
messages, so the reply will go to the from address.

If you really need a Reply-To field (with an address dif-
ferent from the From address), you can always provide a
_prefs_hook_replyto_addr function (in horde/config/hooks.php)
and activate it (in horde/imp/config/prefs.php).

Good luck,
   Otto Stolz







More information about the imp mailing list