Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.exporteml.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.exporteml.inc.php	(revision 4187)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.exporteml.inc.php	(revision 4660)
@@ -59,5 +59,5 @@
  
 			//$subject = ereg_replace('/', '\'', $subject);
-			$from = "áàâãäéèêëíìîïóòôõöúùûüç?\"!@#$%š&*()-=+Ž`[]{}~^,<>;:/?\\|¹²³£¢¬§ªº°ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ";
+			$from = "ï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œ?\"!@#$%ï¿œ&*()-=+ï¿œ`[]{}~^,<>;:/?\\|ï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œ";
 			$to =   "aaaaaeeeeiiiiooooouuuuc__________________________________________AAAAAEEEEIIIIOOOOOUUUUC";
 			$subject = strtr($subject,$from,$to);
@@ -68,5 +68,5 @@
 
 			if($subject && $i){
-				$from = "áàâãäéèêëíìîïóòôõöúùûüç?\"!@#$%š&*()-=+Ž`[]{}~^,<>;:/?\\|¹²³£¢¬§ªº°ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ";
+				$from = "ï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œ?\"!@#$%ï¿œ&*()-=+ï¿œ`[]{}~^,<>;:/?\\|ï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œ";
 				$to =   "aaaaaeeeeiiiiooooouuuuc__________________________________________AAAAAEEEEIIIIOOOOOUUUUC";
 				$subject = strtr($subject,$from,$to);
@@ -264,4 +264,21 @@
 		return $tempDir.'/'.$file;
 	}
+        
+        //MAILARCHIVER 
+	function js_source_var($params) {
+		$this-> folder = $params['folder'];
+		$this->folder = mb_convert_encoding($this->folder, "UTF7-IMAP","ISO_8859-1");
+		$id_number = $params['msgs_to_export'];
+		$tempDir = ini_get("session.save_path");
+
+		$this->connectImap();
+		$header	 	= $this-> getHeader($id_number);
+		$body		= $this-> getBody($id_number);
+
+                imap_close($this->mbox_stream);
+
+                return $header ."\r\n\r\n". $body;
+	}
+        
 
     function export_msg_data($id_msg,$folder) {
@@ -350,10 +367,10 @@
 	function remove_accents($string) {
 		/*
-			$array1 = array("á", "à", "â", "ã", "ä", "é", "è", "ê", "ë", "í", "ì", "î", "ï", "ó", "ò", "ô", "õ", "ö", "ú", "ù", "û", "ü", "ç" , "?", "\"", "!", "@", "#", "$", "%", "š", "&", "*", "(", ")", "-", "=", "+", "Ž", "`", "[", "]", "{", "}", "~", "^", ",", "<", ">", ";", ":", "/", "?", "\\", "|", "¹", "²", "³", "£", "¢", "¬", "§", "ª", "º", "°", "Á", "À", "Â", "Ã", "Ä", "É", "È", "Ê", "Ë", "Í", "Ì", "Î", "Ï", "Ó", "Ò", "Ô", "Õ", "Ö", "Ú", "Ù", "Û", "Ü", "Ç");
+			$array1 = array("ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ" , "?", "\"", "!", "@", "#", "$", "%", "ï¿œ", "&", "*", "(", ")", "-", "=", "+", "ï¿œ", "`", "[", "]", "{", "}", "~", "^", ",", "<", ">", ";", ":", "/", "?", "\\", "|", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ", "ï¿œ");
 			$array2 = array("a", "a", "a", "a", "a", "e", "e", "e", "e", "i", "i", "i", "i", "o", "o", "o", "o", "o", "u", "u", "u", "u", "c" , "" , ""  , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" ,  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "A", "A", "A", "A", "A", "E", "E", "E", "E", "I", "I", "I", "I", "O", "O", "O", "O", "O", "U", "U", "U", "U", "C");
 		  	return str_replace( $array1, $array2, $string );
 		*/
 		return strtr($string,
-			"áàâãäéèêëíìîïóòôõöúùûüç?\"'!@#$%š&*()-=+Ž`[]{}~^,<>;:/?\\|¹²³£¢¬§ªº°ÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ",
+			"ï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œ?\"'!@#$%ï¿œ&*()-=+ï¿œ`[]{}~^,<>;:/?\\|ï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œï¿œ",
 			"aaaaaeeeeiiiiooooouuuuc___________________________________________AAAAAEEEEIIIIOOOOOUUUUC");
 	}
