title: Update mail with php imap
body: <p>I'm making an email client with php and its built in imap functions. I have some issues with the drafts folder. This is how I upload an email after I save it in my own db:</p>
  
  <pre><code>$didAppend = imap_append($this-&gt;imap, $mailbox
                  , "From: " . $mail-&gt;fromContact-&gt;EMAIL . "\r\n"
                  . "To: you@example.com\r\n"
                  . "Subject: " . $mail-&gt;subject . "\r\n"
                  . "Recent: \r\n"
                  . "Draft: X\r\n"
                  . "Unseen: X\r\n"
                  . "\r\n"
                  . $mail-&gt;body . "\r\n", "\\Seen"
          );
  
          if($didAppend) {
              $check = imap_check($this-&gt;imap);
              $mail-&gt;uid = imap_uid($this-&gt;imap, $check-&gt;Nmsgs);
              $mail-&gt;save();
          }
  </code></pre>
  
  <p>This way both of my db are in sync untill I change the mail. 
  I couldn't find any imap function that allows me to save changes on the appended mail. Do I have to delete this mail and save a new one every time I make a change to my email?</p>