Index: /trunk/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- /trunk/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 1630)
+++ /trunk/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 1638)
@@ -2299,4 +2299,5 @@
 		$toaddress = $params['input_to'];
 		$ccaddress = $params['input_cc'];
+                $ccoaddress = $params['input_cco'];
 		$subject = $params['input_subject'];
 		$msg_uid = $params['msg_id'];
@@ -2316,5 +2317,8 @@
 		$folder = @eregi_replace("INBOX.", "INBOX".$this->imap_delimiter, $folder);
 		// End Fix.
-
+                if(strtoupper($folder) == 'INBOX/DRAFTS')
+                    {
+                        $mail->SaveMessageAsDraft = $folder;
+                    }
 		$mail->SaveMessageInFolder = $folder;
 		$mail->SMTPDebug = false;
@@ -2333,4 +2337,5 @@
 		$this->add_recipients("to", $toaddress, &$mail);
 		$this->add_recipients("cc", $ccaddress, &$mail);
+                $this->add_recipients("cco", $ccoaddress, &$mail);
 		$mail->Subject = $subject;
 		$mail->IsHTML(true);
Index: /trunk/expressoMail1_2/inc/class.phpmailer.php
===================================================================
--- /trunk/expressoMail1_2/inc/class.phpmailer.php	(revision 1247)
+++ /trunk/expressoMail1_2/inc/class.phpmailer.php	(revision 1638)
@@ -1020,4 +1020,9 @@
         }
 
+	        $from = array();
+                $from[0][0] = trim($this->From);
+        	$from[0][1] = $this->FromName;
+	        $result .= $this->AddrAppend("From", $from);
+/*
 		if (!$this->SaveMessageAsDraft){
 	        $from = array();
@@ -1032,9 +1037,11 @@
         	$result .= $this->AddrAppend("Sender", $sender);
 		}
-
+*/
         // sendmail and mail() extract Bcc from the header before sending
         if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0))
             $result .= $this->AddrAppend("Bcc", $this->bcc);
-
+        if ($this->SaveMessageAsDraft){
+            $result .= $this->AddrAppend("Bcc", $this->bcc);
+                }
         if(count($this->ReplyTo) > 0)
             $result .= $this->AddrAppend("Reply-to", $this->ReplyTo);
@@ -1077,5 +1084,5 @@
         switch($this->message_type)
         {
-            case "plain":
+            case "plain":$folder = mb_convert_encoding($folder, "UTF7-IMAP","ISO_8859-1");
                 $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding);
                 $result .= sprintf("Content-Type: %s; charset=\"%s\"",
Index: /trunk/expressoMail1_2/js/main.js
===================================================================
--- /trunk/expressoMail1_2/js/main.js	(revision 1635)
+++ /trunk/expressoMail1_2/js/main.js	(revision 1638)
@@ -945,4 +945,9 @@
 		data.cc = data.cc.replace(/&lt;/gi,"<");
 		data.cc = data.cc.replace(/&gt;/gi,">");
+	}
+	if (document.getElementById("cco_" + border_ID)){
+		data.cco = document.getElementById("cco_values_" + border_ID).value;
+		data.cco = data.cco.replace(/&lt;/gi,"<");
+		data.cco = data.cco.replace(/&gt;/gi,">");
 	}
 	if (document.getElementById("subject_" + border_ID))
@@ -1271,4 +1276,10 @@
 				Element("tr_cc_"+ new_border_ID).style.display = '';
 			}
+			if (data.cco){
+				Element("cco_" + new_border_ID).value = data.cco;
+				Element("space_link_" + new_border_ID).style.display = 'none';
+				Element("a_cco_link_" + new_border_ID).style.display = 'none';
+				Element("tr_cco_"+ new_border_ID).style.display = '';
+			}
 			Element("subject_" + new_border_ID).value = data.subject;
 			
Index: /trunk/expressoMail1_2/js/draw_api.js
===================================================================
--- /trunk/expressoMail1_2/js/draw_api.js	(revision 1637)
+++ /trunk/expressoMail1_2/js/draw_api.js	(revision 1638)
@@ -1573,5 +1573,5 @@
 		cco_values.id = "cco_values_"+ID;
 		cco_values.type = "hidden";
-		cco_values.value = info_msg.cco;
+		cco_values.value = info_msg.bcc;
 
 		ccoaddress_array[ID] = info_msg.bcc.split(",");		
