Python Will Not Send Email!!

Carsten Haese carsten.haese at
Fri Nov 20 17:38:42 CET 2009

Victor Subervi wrote:
> On Fri, Nov 20, 2009 at 11:14 AM, Carsten Haese <carsten.haese at
> <mailto:carsten.haese at>> wrote: 
>     Please show us a copy-and-paste of your command line window contents
>     that result from executing <<python>> and then executing
>     <<python -c "import email; print email">> immediately thereafter.
> [root at 13gems <>]#
> python
> Traceback (most recent call last):
>   File "", line 2, in ?
>     import smtplib
>   File "/usr/lib64/python2.4/", line 49, in ?
>     from email.base64MIME import encode as encode_base64
> ImportError: No module named base64MIME
> [root at 13gems <>]#
> python -c "import email; print email"
> <module 'email' from 'email.pyc'>

Thank you. This proves conclusively that there IS in fact a file called
email.pyc (and/or in your directory next to It is
this email.pyc that is being imported instead of the from the
Python library. Getting rid of both and email.pyc (by renaming
them, deleting them, or moving them somewhere else) will fix your problem.

Carsten Haese

More information about the Python-list mailing list