The parameter description is misleading. You can pass a string of flags such as '\Seen' [see imap_setflag_full()] as the last argument. In the other imap functions, 'options' seems to usually refer to a bitmask, not message flags.
I use imap_append() to decode message/rfc822 attachments type(embedded emails):
$attachment = imap_fetchbody($mbox,$mailuid,$atpos,FT_UID);
$attachment = imap_base64($attachment);
$res = imap_append($mbox,mboxspec("INBOX"),$attachment);
//the embedded email is now a normal mail in my INBOX
With SIMS IMAP server you also need to use \r\n as a line terminator, otherwise you will be able to add all the header lines correctly, but the body of the message will not be saved.<br>
You can use \n by itself for each header line, but when creating the blank line between the headers and the body you must use \r\n\r\n