Index: /branches/2.2/expressoMail1_2/index.php
===================================================================
--- /branches/2.2/expressoMail1_2/index.php	(revision 3407)
+++ /branches/2.2/expressoMail1_2/index.php	(revision 3414)
@@ -87,5 +87,6 @@
 
 	$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size']."M" : ini_get('upload_max_filesize');
-	$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] = $current_config['expressoMail_imap_max_folders']; 
+	$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_msg_size'] : "0";
+	$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] = $current_config['expressoMail_imap_max_folders'];
 	$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['max_email_per_page'] : "50";
 	$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['extended_info'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['extended_info']?$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['extended_info'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['extended_info']:'0';
Index: /branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang
===================================================================
--- /branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang	(revision 3407)
+++ /branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang	(revision 3414)
@@ -621,2 +621,4 @@
 Do you want to use SpellChecker in email editor?	expressoMail1_2	pt-br	Quer usar o corretor ortográfico no editor de emails?
 It allow you to check the spelling of your emails	expressoMail1_2	pt-br	Possiblita a correção ortográfica de emails.
+Increases th maximum size of show messages?	expressoMail1_2	pt-br	Você quer que se aumente o limite de tamanho de emails que são mostrados?
+Increases the maximum size of show emails from 100kb to 1mb'	expressoMail1_2	pt-br	Essa opção aumenta o tamanho máximo dos emails mostrados de 100KB para 1MB.
Index: /branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- /branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 3402)
+++ /branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 3414)
@@ -934,14 +934,21 @@
 						&& $file_type != 'attachment')
 				{
+
+				       
+				       if($this->prefs['max_msg_size'] == "1")
+					    $max_size = 1048576;
+					else
+					    $max_size = 102400;
+
 					if($file_type == "text/plain" && !$show_only_html && $has_multipart)
 					{
 						// if TXT file size > 100kb, then it will not expand.
-						if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > 102400)) {
+						if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > $max_size)) {
 							 $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>' . $content . '</pre>';    
+							$content = '<pre>' . $content . '</pre>';
 						}
 					}
 					// if HTML attachment file size > 300kb, then it will not expand.
-					else if($file_type == "text/html"  && $msg->fsize[$msg_number][$values] < 307200)
+					else if($file_type == "text/html"  && $msg->fsize[$msg_number][$values] < $max_size*3)
 					{
 						$content .= $this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]);
Index: /branches/2.2/expressoMail1_2/inc/hook_settings.inc.php
===================================================================
--- /branches/2.2/expressoMail1_2/inc/hook_settings.inc.php	(revision 3400)
+++ /branches/2.2/expressoMail1_2/inc/hook_settings.inc.php	(revision 3414)
@@ -207,4 +207,5 @@
 
 create_select_box('What is the height of the lines in the list of messages?','line_height',$default,'');
+create_check_box('Increases th maximum size of show messages?','max_msg_size','Increases the maximum size of show emails from 100kb to 1mb');
 create_check_box('Use dynamic contacts?','use_dynamic_contacts','Store your\'s most used contacts');
 create_check_box('Use shortcuts?','use_shortcuts','n key (Open new message)<br>ESC key (Close tab)<br>i key (print)<br>e key (forward)<br>r key (reply)<br>DELETE key (delete the current message)<br>Ctrl + up (go to previous message)<br>Ctrl + down (go to next message)<br>Shift + up or down (select multiple messages)<br>F9  key (search at catalog)<br>');
