[imp] SMTP auth in IMP (Important) now working for me but I need more

Eric Rostetter eric.rostetter@physics.utexas.edu
Wed, 29 May 2002 09:55:01 -0500

Quoting Santiesteban Sifontes <alietss@yahoo.com>:

> Hi Eric:
> I tested, but all I get is a blank page, I'm doing
> this configuration in horde/config/horde.php where I
> know you can define this, if it is in some other place
> let me know.

In HEAD, you don't need to define this.  You simply need to tell it
you want to use SMTP authentication in horde/config/horde.php by
setting the 'auth' param.  The code is in IMP.php and reads:

         * If SMTP authentication has been requested, populate the username and
         * password fields based on the current values for the user.
         * Note that we assume that the username and password values from the
         * current IMAP / POP3 connection are valid for SMTP authentication as
         * well.
        if (!empty($params['auth'])) {
            $params['username'] = $imp['user'];
            $params['password'] = Secret::read(Secret::getKey('imp'), $imp['pass']);

However, this code is not in the non-head code.  So, since this code seems
to stand fairly independently of the rest, you can try something like
patching horde/imp/compose.php as follows

<          if (!empty($imp['smtphost'])) {
<              $conf['mailer']['params']['host'] = $imp['smtphost'];
<          }
<          $mailer = &Mail::factory($conf['mailer']['type'],
>          if (!empty($imp['smtphost'])) {
>              $conf['mailer']['params']['host'] = $imp['smtphost'];
>              $conf['mailer']['params']['username'] = $imp['user'];
>              $conf['mailer']['params']['password'] = 
>                   Secret::read(Secret::getKey('imp'), $imp['pass']);    
>          }
>          $mailer = &Mail::factory($conf['mailer']['type'],

(where the last line is wrapped in both cases for email purposes, unwrap
it when patching the file)

Hope that helps!

Eric Rostetter

Hey Rocky!  Watch me pull a rabbit from my hat!