[Tutor] smtplib help required

James Chapman james at uplinkzero.com
Sat Apr 24 00:41:04 CEST 2010

Hi there gurus and everyone else. This is my first post to this group,
and I'm turning here because I'm stumped and search engines are not

I've used smtplib for a few things already and while wanting to use
it again today, I'm having weird things happen.

Basically, my code looks like this:

#!/usr/bin/env python

import smtplib



and when I run it, I get this:
srv1:~/python# ./email.py 
Traceback (most recent call last):
  File "./email.py", line 3, in 
    import smtplib
  File "/usr/local/lib/python2.6/smtplib.py", line 46, in 
    import email.utils
ImportError: No module named utils


And I can also confirm that email.utils exists
srv1:~/python# file /usr/local/lib/python2.6/email/utils.py
/usr/local/lib/python2.6/email/utils.py: ASCII Java program text

So can anyone steer me in the right direction?
Oh, this first happened with the Debian distro release Python2.5, I
then downloaded and compiled 2.6.5 and it's still happening. I'm very
lost and would appreciate any help on the matter.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100423/a6f91643/attachment.html>

More information about the Tutor mailing list