[horde] horde-alarms and SMTP auth; workaround
Steffen
skhorde at smail.inf.fh-bonn-rhein-sieg.de
Wed Aug 12 14:21:41 UTC 2015
Hi,
I was looking into the problem, that horde-alarms cannot send email
notifications, because I require SMTP auth.
I found some old bug report, that it works if you configure the username
and password in config.php, well, obviously it does. :-)
Hence, I was looking for a way to pass username & password to the CLI
programm.
I now try this:
Horde_Registry::appInit('horde', array('cli' => true, 'user_admin' => true));
// set mailer params just for this CLI
$conf['mailer']['params']['username_auth'] = false;
$conf['mailer']['params']['password_auth'] = false;
$conf['mailer']['params']['username'] = '<user>';
$conf['mailer']['params']['password'] = '<password>';
$alarm = $injector->getInstance('Horde_Alarm');
$alarm->notify(null, true, false, array('notify', 'desktop'));
foreach ($alarm->getErrors() as $error) {
$cli->message($error, 'cli.error');
}
===========
It works for now. Will this technique break in the neat future, because
some fundamental change is going to happen? Is there a way, to pass
user/password from a CLI programm to the Horde framework as if it had
authentificated the "normal" way to Horde?
--
Steffen
More information about the horde
mailing list