/** * Writes a SyncNote to MAPI * * @param mixed $mapimessage * @param SyncNote $note * * @access private * @return boolean */ private function setNote($mapimessage, $note) { // Touchdown does not send categories if all are unset or there is none. // Setting it to an empty array will unset the property in Zarafa as well if (!isset($note->categories)) { $note->categories = array(); } $this->setPropsInMAPI($mapimessage, $note, MAPIMapping::GetNoteMapping()); $noteprops = MAPIMapping::GetNoteProperties(); $noteprops = $this->getPropIdsFromStrings($noteprops); // note specific properties to be set $props = array(); $props[$noteprops["messageclass"]] = "IPM.StickyNote"; // set body otherwise the note will be "broken" when editing it in outlook $props[$noteprops["body"]] = $note->asbody->data; mapi_setprops($mapimessage, $props); }
/** * Writes a SyncNote to MAPI * * @param mixed $mapimessage * @param SyncNote $note * * @access private * @return boolean */ private function setNote($mapimessage, $note) { // Touchdown does not send categories if all are unset or there is none. // Setting it to an empty array will unset the property in KC as well if (!isset($note->categories)) { $note->categories = array(); } // update icon index to correspond to the color if (isset($note->Color) && $note->Color > -1 && $note->Color < 5) { $note->Iconindex = 768 + $note->Color; } $this->setPropsInMAPI($mapimessage, $note, MAPIMapping::GetNoteMapping()); $noteprops = MAPIMapping::GetNoteProperties(); $noteprops = $this->getPropIdsFromStrings($noteprops); // note specific properties to be set $props = array(); $props[$noteprops["messageclass"]] = "IPM.StickyNote"; // set body otherwise the note will be "broken" when editing it in outlook if (isset($note->asbody)) { $this->setASbody($note->asbody, $props, $noteprops); } $props[$noteprops["internetcpid"]] = INTERNET_CPID_UTF8; mapi_setprops($mapimessage, $props); }