[Tutor] Sending an email alert

member thudfoo thudfoo at opensuse.us
Sat Aug 29 00:39:28 CEST 2009


On Fri, Aug 28, 2009 at 12:00 PM, Marc <marc at marcd.org> wrote:
[...]
>     s = smtplib.SMTP('smtp.marcd.org')
>
> AttributeError: 'module' object has no attribute 'SMTP'
>
>
>
> The code I am trying to use is:
>
>
>
> import smtplib
>
[...]

Make sure you do not have a file called "smtplib.py" on the your python path:

put this statement after "import smtplib":

    print smtplib.__file__

in order to find out what "smtplib" is being imported.

HTH
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



More information about the Python-list mailing list