Email in 2.6.4

Simon Brunning simon at brunningonline.net
Mon May 24 10:21:56 EDT 2010


On 24 May 2010 14:59:24 UTC+1, dirknbr <dirknbr at googlemail.com> wrote:
> It doesn't error on 'import email' but does on call to MimeText.
>
> import email
> msg = MIMEText('test')
>
> NameError: name 'MIMEText' is not defined

Here you want:

msg = email.MIMEText('test')

-- 
Cheers,
Simon B.



More information about the Python-list mailing list