This module sends E-mail notifications to watchers for events that
take place on watched objects. The messages themselves are generated
similar to print_message/2 using the grammars
- Define the subject of the message
- Define the body of the message
- To be done
- - Eventually, this should also be used to provide an RSS feed from
- notify(+Object, +Term)
- Notify watching users by mail of the event on Object, described
- notification_user(-User) is det[private]
- Find the origin of the event, which is either the UUID of the
logged on user that triggered the event, the peer IP address of
this user or
'<not from http>'.
- send_message(+Parts, +Output) is det[private]
- Write message fragments to Output. This is similar to
- make_subject(+Object, +Event)//[private]
- Generate the fragments that describe the subject for Event on
- make_message(+UUID, +Object, +User, +Event)//[private]
- Generate the fragments that describe the message body for Event
- server(-Server) is det[private]
- Provide a URL for the server. Note that the mail server runs in
a different thread and thus the HTTP thread should call this
before launching the mail thread.
- msg_user(+UUID)// is det
- Plain-text reference to a user with hyperlink.
- watcher(+Object, -MailOrUser) is nondet[private]
- True when Object is being watched by MailOrUser. Note that users
are described by their UUID, and thus never conflict with a
valid mail address.
- To be done
- - : Allow users to set watches