diff --git a/docs/html/index.html b/docs/html/index.html index 30d618bd..c4ce7fef 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -88,6 +88,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
uint32_t contact_id = mrmailbox_create_contact(mailbox, NULL, "bob@delta.chat"); // use a real testing address here
uint32_t chat_id = mrmailbox_create_chat_by_contact_id(mailbox, contact_id);
mrmailbox_send_text_msg(mailbox, chat_id, "Hi, here is my first message!");

Now, go to the testing address (bob) and you should have received a normal email. Answer this email in any email program with "Got it!" and you will get the message from delta as follows:

mrarray_t* msglist = mrmailbox_get_chat_msgs(mailbox, chat_id, 0, 0);
for( size_t i = 0; i < mrarray_get_cnt(msglist); i++ )
{
uint32_t msg_id = mrarray_get_id(msglist, i);
mrmsg_t* msg = mrmailbox_get_msg(mailbox, msg_id);
char* text = mrmsg_get_text(msg);
printf("message %i: %s\n", i+1, text);
free(text);
mrmsg_unref(msg);
}
mrarray_unref(msglist);

This will output the following two lines:

Message 1: Hi, here is my first message!
Message 2: Got it!

I think, you got the idea. For further reading, please dive into the mrmailbox_t class.

+

Class reference

+

For a class reference, see the "Classes" link atop.

Further hints

Here are some additional, unsorted hints that may be useful. If you need any further assistance, please do not hesitate to contact us at r10s@.nosp@m.b44t.nosp@m..com.