I want to be able to send messages from an external application via an http request to users. For this reason I ‘merged’ UserService and Subscription plugins. With this modification userService can send messages to users. All you need to do is to build a correct http request in your application.
- Note, that I’m NOT a Java programmer at all!
- In order to use this modification you’ll have to reinstall the userService Plugin.
- No error handling is provided.
New parameters added:
|sender of the message
|recipient of the message
|subject of the message
|body (text) of the message
|a valid username
Example query 3.6+ :
Example query 3.7+ :
All parameters can be sent via HTTP POST or GET methods in a single query. For example the sender, the recipient and the subject parameters use http GET, while the msg parameter uses http POST method.
Note: In order to send big (more than ~2k) messages you need to use POST method for the msg parameter. You need to urlencode() some or all the values!
An example usage is an intranet web application that sends message to a user when someone opens a link. A simple PHP example:
|Simple PHP example