Messaging¶
Logged in users may send messages to other users that exist in the system. Currently only e-mail is supported as transport, but this functionality may be extended to an internal messaging mechanism in a future release.
E-mail¶
Messages can only be sent to e-mail addresses that are assigned to users in the system. A lookup of the recipient is performed before the message is sent. The from
header is automatically set to the e-mail address configured in entrystore.properties, whereas the reply-to
header is set the e-mail address of the sending user.
Contrary to how messages for signup, password reset, etc. are handled, the generic messaging mechanism is currently not based on server-side provided templates. This means that the client needs to provide the full message body, including HTML and CSS, if a nicely formatted message is to be sent. This may change in the future when other transports in addition to e-mail are implemented.
API¶
Endpoint¶
https://{base}/store/message
Parameters¶
The following mandatory parameters are supported in a JSON-based request body:
transport
: Mode of transport, currently onlyemail
is supported.to
: Username (e-mail address) of recipient, must be assigned to an existing user in the system.subject
: The message subject.body
: The message body. May contain HTML.
Example¶
POST https://{base}/store/message
Content-Type: application/json
{
"transport": "email",
"to": "user@in.system",
"subject": "This is a test message",
"body": "This is the body of the test message"
}