+
+ EM_DEBUG_LOG("count: [%d], mailbox_list[%p]", *count, *mailbox_list);
+ if (*count <= 0 || *mailbox_list == NULL) {
+ err = EMAIL_ERROR_MAILBOX_NOT_FOUND;
+ ret = false;
+ } else {
+ ret = true;
+
+ /* checking once more if there is a INBOX or not */
+ int i = 0;
+ bool is_found_inbox = false;
+ for (i = 0; i < *count; i++) {
+ if ((*mailbox_list)[i].mailbox_type == EMAIL_MAILBOX_TYPE_INBOX || !g_ascii_strcasecmp((*mailbox_list)[i].mailbox_name, "INBOX")) {
+ is_found_inbox = true;
+ break;
+ }
+ }
+ if (!is_found_inbox) {
+ EM_DEBUG_CRITICAL_EXCEPTION("There is no INBOX!");
+ err = EMAIL_ERROR_MAILBOX_NOT_FOUND;
+ ret = false;
+ }
+ }