break;
         }
     }
     $email->set_oldattachments($attachments);
 }
 // Add body
 $email->set_body($form->body);
 // Add users sent mail
 if (isset($form->to)) {
     $email->set_sendusersbyto($form->to);
 }
 if (isset($form->cc)) {
     $email->set_sendusersbycc($form->cc);
 }
 if (isset($form->bcc)) {
     $email->set_sendusersbybcc($form->bcc);
 }
 // Add type action and if corresponding old mail id.
 $email->set_type($form->action);
 $email->set_oldmailid(isset($form->oldmailid) ? $form->oldmailid : NULL);
 $email->set_mailid(isset($form->id) ? $form->id : NULL);
 // Add new mail, in the Inbox or corresponding folder
 if (empty($form->draft)) {
     if (isset($form->action)) {
         if ($form->action == EMAIL_FORWARD) {
             $form->oldmailid = NULL;
             // Drop mailid on forward
         }
     }
     if (!$email->send()) {
         notify('Don\'t send mail');