Files
services/messages
Asim Aslam 285fcef4e8 bump micro
2021-01-27 11:03:21 +00:00
..
2021-01-27 11:03:21 +00:00
2021-01-19 16:59:25 +00:00
2020-10-16 13:48:31 +01:00
2020-10-19 12:59:34 +01:00
2021-01-19 16:59:25 +00:00
2021-01-19 16:59:25 +00:00

The messages service is a simplified service for sending messages, much like email.

Messages Service

Send a message

CLI

> micro messages send --to=John --from=Barry --subject=HelloWorld --text="Hello John"

List the messages a user has received

CLI

> micro messages list --user=John
{
	"messages": [
		{
			"id": "78efd836-ca51-4163-af43-65985f7c6587",
			"to": "John",
			"from": "Barry",
			"subject": "HelloWorld",
			"text": "Hello John",
			"sent_at": "1602777240"
		}
	]
}

Lookup an individual email by ID

CLI

> micro messages read --id=78efd836-ca51-4163-af43-65985f7c6587
{
	"message": {
		"id": "78efd836-ca51-4163-af43-65985f7c6587",
		"to": "John",
		"from": "Barry",
		"subject": "HelloWorld",
		"text": "Hello John",
		"sent_at": "1602777240"
	}
}