Python Will Not Send Email!!

Victor Subervi victorsubervi at gmail.com
Thu Nov 19 16:28:37 CET 2009


Hi;
I created this testMail.py file as root:

#!/usr/bin/env python
import smtplib
session = smtplib.SMTP("localhost")
subject = "Hello, "
header = "Subject: %s \r\nContent-type: text/html; charset=utf-8\r\n\r\n"
message = "world!"
email_from = "victor at is.awesome"
email_to = ["email at myhost.com"]
session.sendmail(email_from, email_to, header+messages)

[root at 13gems globalsolutionsgroup.vi]# chmod 755 testMail.py
[root at 13gems globalsolutionsgroup.vi]# python testMail.py
Traceback (most recent call last):
  File "testMail.py", line 2, in ?
    import smtplib
  File "/usr/lib64/python2.4/smtplib.py", line 49, in ?
    from email.base64MIME import encode as encode_base64
ImportError: No module named base64MIME

What gives??
TIA,
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091119/b58169a1/attachment.html>


More information about the Python-list mailing list