[dev] Horde Notification
Michael J Rubinsky
mrubinsk at horde.org
Mon Jan 2 15:56:31 UTC 2017
Quoting Sebastian Birnbach <birnbacs at gmail.com>:
> I came across the Horde_Notification lib as a means to display user
> messages. The library seems to go way beyond this but I could not find
> example code or a writeup on the notification mechanism.
>
> questions:
> * what listeners are there in a standard Horde installation?
Look in Horde/Notification/Listener and Core/Notification/Listener
> * what are the supported status levels? horde.error, horde.warning,
> horde.message - anything else?
horde.alarm, horde.success.
These are defined in Horde_Core_Notification_Event_Status::
> * how can notifications be used for logging?
horde.error messages are already logged. If you want to add additional
logging, look at Horde_Core_Notification_Handler_Decorator_Hordelog::
to see how this is done. Also, look at
Horde_Core_Factory_Notification:: to see how everything is registered.
> * can notifications be used for sending emails? The API docs speak of this
> possibility but I am not sure how to do it - and why to prefer it over
> using the mail application API directly.
Depending on what you are trying to do, you would either implement
another Listener or Decorator to send the desired status message.
Also, if by "mail application" you mean IMP, then it doesn't have any
external API to send a message. You would use Horde_Mail or
Horde_Mime_Mail to send the message.
As for why use Horde_Notification to do this, you would do this if it
suits your needs to send an email when a certain type of notification
is raised.
>
> Thanks and a good new year to everybody!
>
> Sebastian
> --
> dev mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
--
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3282 bytes
Desc: S/MIME Signature
URL: <https://lists.horde.org/archives/dev/attachments/20170102/a958db81/attachment.bin>
More information about the dev
mailing list