email - Update mail with php imap -


i'm making email client php , built in imap functions. have issues drafts folder. how upload email after save in own db:

$didappend = imap_append($this->imap, $mailbox                 , "from: " . $mail->fromcontact->email . "\r\n"                 . "to: you@example.com\r\n"                 . "subject: " . $mail->subject . "\r\n"                 . "recent: \r\n"                 . "draft: x\r\n"                 . "unseen: x\r\n"                 . "\r\n"                 . $mail->body . "\r\n", "\\seen"         );          if($didappend) {             $check = imap_check($this->imap);             $mail->uid = imap_uid($this->imap, $check->nmsgs);             $mail->save();         } 

this way both of db in sync untill change mail. couldn't find imap function allows me save changes on appended mail. have delete mail , save new 1 every time make change email?

yes. messages in imap immutable. can change flags, that's it.


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -