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
Post a Comment