Sending a mail

Peter Posselt Vestergaard posselt at
Mon Aug 23 12:01:15 EDT 1999

I want my script to send a mail with a specific subject. I've tried to
import and use the smtplib, but I get the message that it doesn't exist
- maybe it isn't implemented on the server I'm using, and anyway - I
can't specify a subject using the sendmail()-command...
Then I tried to use the os.system like follows:

import os
text='echo "hello"|mailto posselt at -s "important message"'

This works quite fine in my python interpreter, but not then I put it on
the web. I tried to print out the standardoutput from os.system(text)
and it was 256. Probably my python-server won't allow me to execute that
command or what? I hope that anyone knows some kind of workaround, or
another way to do this???
Best regards
Peter Posselt Vestergaard

More information about the Python-list mailing list