On Wed, 06 Jul 2011 11:53:43 +0200, xavier delannoy <xavier.delan...@cloudmark.com> wrote: > I use the python email library for an Automation Test Framework. The > framework test a Mail Transfert Agent. I notice that the "email" library > silently fix a lot of MIME errors. I can understand this behaviour, but > I need to validate that the email sent by the MTA are correct. > I wonder if there's a way to use the python MIME Parser more > "aggressively" (without modifying the email) and raise and exception as > soon as an error is detected. > > Here's my needs and an extract of my python:
Not at the moment. You can check the defects attribute afterward to see if there were any detected errors, though. In email6 (planned for python 3.3) we will be providing a facility for doing the raise immediately. I don't know what you mean by leave the message unmodified, though, since the input string is already unmodified, and you won't get a message object when an error is raised. --David _______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com