Email in 2.6.4
Mark Lawrence
breamoreboy at yahoo.co.uk
Mon May 24 10:35:39 EDT 2010
On 24/05/2010 14:59, dirknbr wrote:
> I have now easy_installled email and I still get errors.
I've done this as well, but don't see why I have to. Is this a
documentation bug, an installation bug or what?
>
> It doesn't error on 'import email' but does on call to MimeText.
>
> import email
> msg = MIMEText('test')
>
> NameError: name 'MIMEText' is not defined
>
> What should I do?
Give the fully qualified name i.e. email.mime.text.MIMEText.
Regards.
Mark Lawrence.
More information about the Python-list
mailing list