Python Will Not Send Email!!

Victor Subervi victorsubervi at gmail.com
Thu Nov 19 10:29:34 EST 2009


On Thu, Nov 19, 2009 at 11:28 AM, Victor Subervi <victorsubervi at gmail.com>wrote:

> 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
>
PS Python 2.4 on CentOS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091119/16af38ed/attachment-0001.html>


More information about the Python-list mailing list