| 
									
										
										
										
											2002-04-10 21:01:31 +00:00
										 |  |  |  | # Copyright (C) 2001,2002 Python Software Foundation | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  | # Author: barry@zope.com (Barry Warsaw) | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | """A package for parsing, handling, and generating email messages.
 | 
					
						
							|  |  |  |  | """
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-07-18 21:29:17 +00:00
										 |  |  |  | __version__ = '2.2' | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-04-10 21:01:31 +00:00
										 |  |  |  | __all__ = ['Charset', | 
					
						
							|  |  |  |  |            'Encoders', | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  |            'Errors', | 
					
						
							|  |  |  |  |            'Generator', | 
					
						
							| 
									
										
										
										
											2002-04-10 21:01:31 +00:00
										 |  |  |  |            'Header', | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  |            'Iterators', | 
					
						
							| 
									
										
										
										
											2001-10-09 19:14:59 +00:00
										 |  |  |  |            'MIMEAudio', | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  |            'MIMEBase', | 
					
						
							| 
									
										
										
										
											2001-10-09 19:14:59 +00:00
										 |  |  |  |            'MIMEImage', | 
					
						
							|  |  |  |  |            'MIMEMessage', | 
					
						
							|  |  |  |  |            'MIMEText', | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  |            'Message', | 
					
						
							|  |  |  |  |            'Parser', | 
					
						
							|  |  |  |  |            'Utils', | 
					
						
							| 
									
										
										
										
											2002-04-10 21:01:31 +00:00
										 |  |  |  |            'base64MIME', | 
					
						
							|  |  |  |  |            'quopriMIME', | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  |            'message_from_string', | 
					
						
							|  |  |  |  |            'message_from_file', | 
					
						
							|  |  |  |  |            ] | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-10-04 17:05:11 +00:00
										 |  |  |  |  | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  | # Some convenience routines | 
					
						
							| 
									
										
										
										
											2002-06-01 06:03:09 +00:00
										 |  |  |  | from email.Parser import Parser as _Parser | 
					
						
							|  |  |  |  | from email.Message import Message as _Message | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-07-19 22:26:01 +00:00
										 |  |  |  | def message_from_string(s, _class=_Message, strict=0): | 
					
						
							| 
									
										
										
										
											2002-07-18 21:29:17 +00:00
										 |  |  |  |     return _Parser(_class, strict=strict).parsestr(s) | 
					
						
							| 
									
										
										
										
											2001-09-23 03:17:28 +00:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-07-19 22:26:01 +00:00
										 |  |  |  | def message_from_file(fp, _class=_Message, strict=0): | 
					
						
							| 
									
										
										
										
											2002-07-18 21:29:17 +00:00
										 |  |  |  |     return _Parser(_class, strict=strict).parse(fp) |