[imp] Fwd: [Bug 1253] Changed - From: address appears as "user%domain@domain" using vpopmail back-end

Chuck Hagenbuch chuck at horde.org
Tue May 20 14:11:07 PDT 2003



----- Forwarded message from bugs at bugs.horde.org -----
    Date: Tue, 20 May 2003 18:09:35 -0300
    From: bugs at bugs.horde.org
Reply-To: bugs at horde.org
 Subject: [Bug 1253] Changed - From: address appears as "user%domain at domain"
using vpopmail back-end
      To: chuck at horde.org, loundry2000 at yahoo.com, bugs at horde.org

http://bugs.horde.org/show_bug.cgi?id=1253

*** shadow/1253	Tue May 20 14:03:09 2003
--- shadow/1253.tmp.6401	Tue May 20 18:09:35 2003
***************
*** 29,31 ****
--- 29,48 ----
  ------- Additional Comments From chuck at horde.org  05/20/03 14:03 -------
  You need to either fix your username hook to correct this, or set up a
from_hook
  for all users that reformats the address correctly.
+
+ ------- Additional Comments From loundry2000 at yahoo.com  05/20/03 18:09
-------
+ I have added the following code to imp/config/conf.php:
+
+ $conf['hooks']['from'] = 'extract_email_addr';
+
+ if (!function_exists('extract_email_addr')) {
+     function extract_email_addr ($imp) {
+         $user_array = explode ('%', $imp['user']);
+         $domain_array = explode('@', $user_array[1]);
+         return $user_array[0] . "@" . $domain_array[0];
+     }
+ }
+
+ The From: address now correctly reports the email address (user at domain). 
The
+ HORDE main page incorrectly displays "Welcome, user%domain at domain".  Is
there
+ another hook I can write to fix this as well?



----- End forwarded message -----


-chuck

--
Charles Hagenbuch, <chuck at horde.org>
The alligators were there, too, in a bathtub inside the house.


More information about the imp mailing list