Factor out the date guessing/retrieving
savemessage was too long and complex. Factor out the date guessing part of the function and put it into a function of its own. The logic of the date guessing is the same, however, we do not use the imaplib.Time2InternalDate() function as it is buggy (http://bugs.python.org/issue11024) and returns localized patches. So we create INTERNALDATE ourselves and pass it to append() as a string. This commit fixes a bug that international users used to pass an invalid date to the IMAP server, which the server will either ignore or complain about. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
		 Sebastian Spaeth
					Sebastian Spaeth
				
			
				
					committed by
					
						 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
			
				
	
			
			
			 Nicolas Sebrecht
						Nicolas Sebrecht
					
				
			
						parent
						
							419f27418e
						
					
				
				
					commit
					d22c762385
				
			| @@ -26,8 +26,9 @@ Bug Fixes | ||||
|  | ||||
| * Allow SSL connections to send keep-alive messages. | ||||
| * Fix regression (UIBase is no more). | ||||
|  | ||||
| * Make profiling mode really enforce single-threading | ||||
| * Do not send localized date strings to the IMAP server as it will | ||||
|   either ignore or refuse them. | ||||
|  | ||||
| Pending for the next major release | ||||
| ================================== | ||||
|   | ||||
		Reference in New Issue
	
	Block a user