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 |
sender of the message |
OF version |
|
recipient |
recipient of the message |
3.6+ |
|
subject |
subject of the message |
3.6+ |
|
msg |
body (text) of the message |
3.6+ |
|
username |
a valid username |
3.7+ |
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 |
|
|