This RFC describe the CaliOpen message API requirements to create a new message.
Message related resources are Thread, Message, MessagePart and Recipient.
A message is created in a draft
status and then can be identified by its message_id
property. If this message is related to a Thread then it MUST be created with a
thread_id
reference.
A recipient MIGHT be related to an known Contact. It is defined by the following informations:
contact_id
: Known user contact referenceaddress
: Address to use for sending a message to this recipientprotocol
: Communication protocol for this recipient addressEvery new message MIGHT provide the following information:
thread_id
: Reference to the thread the message is included in.body
: the message body/content/textto
: List of recipients to send message tocc
: List of recipients to send a carbon copy of this messagebcc
: List of recipients to send a blind carbon copy of this messagesubject
: Message subject, only apply for mail formatattachments
: List of attachments included in the mailThese informations can be updated until message is finalized.
This resource concern attachments that can be included when preparing a new message.
message_id
: Message reference this part is related tocontent_type
: MIME content type for this partdata
: Part contentWhen replying to a thread, recipients are known and MUST NOT be defined.
When adding a new recipient to a message having a thread reference, what happen ? ** Create a new thread ? ** Include this recipient in current thread ?
When defining recipient for a new message, it may define which Thread this message may relate to.