Index: /branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- /branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 3038)
+++ /branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 3128)
@@ -732,5 +732,5 @@
 					$content = $this -> replace_links( $content );
 					$content = str_replace( array( ' #$&lt;$# ', ' #$&gt;$# ' ), array( '&lt;', '&gt;' ), $content );
-					$content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';
+					$content = '<pre>' . $content . '</pre>';
 
 					$return[ 'body' ] = $content;
@@ -784,5 +784,5 @@
 						if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > 102400)) {
 							$content .= htmlentities($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]));
-							$content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';							
+							$content = '<pre>' . $content . '</pre>';							
 						}
 					}
@@ -798,5 +798,5 @@
 					$content .= "<hr align='left' width='95%' style='border:1px solid #DCDCDC'>";
 					$content .= $this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]);
-					$content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';
+					$content = '<pre>' . $content . '</pre>';
 
 				}
@@ -862,5 +862,5 @@
 									$body = $this -> replace_links( $body );
 									$body = str_replace( array( ' #$&lt;$# ', ' #$&gt;$# ' ), array( '&lt;', '&gt;' ), $body );
-									$body = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;font-family: monospace;font-size:12px">' . $body . '</pre>';
+									$body = '<pre>' . $body . '</pre>';
 								}
 
Index: /branches/2.0/expressoMail1_2/js/main.js
===================================================================
--- /branches/2.0/expressoMail1_2/js/main.js	(revision 2967)
+++ /branches/2.0/expressoMail1_2/js/main.js	(revision 3128)
@@ -1331,4 +1331,7 @@
 		title = title.substring(0, parseInt(resize)*0.08);
 
+	// Load default style for <PRE> tag, inside RichTextEditor.
+	RichTextEditor.loadStyle("pre","main.css");	
+
 	Element("border_id_" + new_border_ID).innerHTML = "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td id=font_border_id_" + new_border_ID +" class='font-menu' width=*>" +title + "</td><td width=1px><img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + new_border_ID + "','false') src='templates/"+template+"/images/close_button.gif'></td></tr></table>";
 	return new_border_ID; //Preciso retornar o ID da nova mensagem.
@@ -2003,8 +2006,20 @@
 	}
 	
+	var current_path = window.location.href.substr(0,window.location.href.lastIndexOf("/"));
+	var window_print_head  = window_print.document.getElementsByTagName("head")[0];
+	// For IE
+	if(typeof(window_print_head) == 'undefined'){
+		window_print_head = window_print.document.createElement("head");
+		window_print.document.appendChild(window_print_head);
+	}
+	var window_print_style = window_print.document.createElement("LINK");
+	window_print_style.href = current_path+'/templates/default/main.css';
+	window_print_style.type = "text/css";
+	window_print_style.rel = "stylesheet";
+	window_print_head.appendChild(window_print_style);
+	
 	while (1){
 		try{
-			var html = '<br><br>';
-			//html += "<input type='button' value='Imprimir' onclick='javascript:window.print();'>";
+			var html ='<body>';
 			html += "<h4>ExpressoLivre - ExpressoMail</h4><hr>";
 			html += '<table><tbody>';
@@ -2027,5 +2042,5 @@
 			html += "<tr><td width=7%><font size='2'>" + get_lang('Subject')+ ": </font></td><td><font size='2'>"+subject.innerHTML+"</font></td></tr>";
 			html += "</tbody></table><hr>";
-			window_print.document.body.innerHTML = html + '<blockquote><font size="2">' + body.innerHTML + '</font></blockquote>';
+			window_print.document.body.innerHTML = html + body.innerHTML;
 			if(!is_ie){
 				var tab_tags = window_print.document.getElementsByTagName("IMG");			
Index: /branches/2.0/expressoMail1_2/js/rich_text_editor.js
===================================================================
--- /branches/2.0/expressoMail1_2/js/rich_text_editor.js	(revision 1296)
+++ /branches/2.0/expressoMail1_2/js/rich_text_editor.js	(revision 3128)
@@ -64,4 +64,43 @@
 		parentDiv.appendChild(checkbox);
 		parentDiv.appendChild(text);
+}
+
+cRichTextEditor.prototype.loadStyle = function(tag, css_file) {
+	var theRules = new Array();
+	var stylePRE = "";	
+	for(var s = 0; s < document.styleSheets.length; s++) {
+		if(document.styleSheets[s].href != null && 
+				document.styleSheets[s].href.match("templates/"+template+"/"+css_file)){			
+			if (document.styleSheets[s].cssRules)
+				theRules = document.styleSheets[s].cssRules;
+			else if (document.styleSheets[s].rules)
+				theRules = document.styleSheets[s].rules;
+			break;
+		}
+	}
+	for(var s = 0;s < theRules.length; s++){
+		if(theRules[s].selectorText.toLowerCase() == tag.toLowerCase()){			
+			stylePRE = theRules[s].style;
+			break;
+		}
+	}
+	var _body = Element(this.editor);
+	var i_doc = (document.all) ? _body.contentWindow.document: _body.contentDocument;
+	var hh1 = i_doc.getElementsByTagName('head')[0];
+	// For IE
+	if(typeof(hh1) == 'undefined'){
+		hh1 = i_doc.createElement("head");
+		i_doc.appendChild(hh1);
+	}
+	var ss1 = i_doc.createElement('style');	
+	ss1.setAttribute("type", "text/css"); 
+	var def = tag.toLowerCase()+' {'+stylePRE.cssText+'}';
+	if (ss1.styleSheet) { 
+	    ss1.styleSheet.cssText = def;
+	} else {
+	    var tt1 = i_doc.createTextNode(def);
+	    ss1.appendChild(tt1);
+	}
+	hh1.appendChild(ss1);
 }
 
Index: /branches/2.0/expressoMail1_2/templates/default/main.css
===================================================================
--- /branches/2.0/expressoMail1_2/templates/default/main.css	(revision 2957)
+++ /branches/2.0/expressoMail1_2/templates/default/main.css	(revision 3128)
@@ -1,2 +1,12 @@
+pre{
+	white-space: pre-wrap !important; /* css-3 */
+	white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
+	white-space: -pre-wrap !important; /* Opera 4-6 */
+	white-space: -o-pre-wrap !important; /* Opera 7 */
+	word-wrap: break-word !important; /* Internet Explorer 5.5+ */
+	font-family: monospace !important;	
+	font-size: 12px !important;
+}
+
 * {
 	font-family: Verdana, Arial, Helvetica, sans-serif;	
