[imp] hook for virtual user's from address
Jan Schneider
jan at horde.org
Wed Aug 3 00:19:04 PDT 2005
Zitat von Dale Gallagher <fastfoo at fastmail.fm>:
> Hi there
>
> I found Daniel Frazier's post which appears to offer a solution to my
> requirement, but for some reason I cannot get it to work. Pointers would
> be appreciated - thanks.
>
> Here's Daniel's post:
>
> http://archives.free.net.ph/message/20050701.130643.b1042d9b.en.html
>
> Requirement Summary:
>
> My users login using their imap/pop3 logins, which are of the form
> vuser%vhost. I would like the sending From/Return-Path address and
> "Identity", as it appears on the message compose screen to be vuser at vhost.
>
> What I've tried:
>
> In horde/config/hooks.php:
>
> if (!function_exists('_prefs_hook_from_addr')) {
> function _prefs_hook_from_addr($user = null) {
> if (is_null($user)) {
> $user = Auth::getAuth();
> }
> return str_replace('%', '@', $user);
> }
> }
>
> In horde/config/prefs.php:
>
> $_prefs['from_addr'] = array(
> 'value' => '',
> 'locked' => true,
> 'shared' => true,
> 'type' => 'text',
> 'hook' => true,
> 'desc' => _("Your From: address:")
> );
This should work. But only for fresh users that didn't login before.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the imp
mailing list