Using mail in a Python script?

Casper Stoel (cbs@ascinc.com)
Wed, 22 Mar 1995 18:07:32 GMT

Hi folks:

I have a little problem with my (executable) Python scripts.
I am trying to send an email message from within a Python
script that gets invoked as an action by a HTML form. I am
using:
posix.system('mail -s \"subject\" someone < message')

to mail the message. However, when running the script it complains
that it cannot access some /usr/spool/mqueue directory. I even
changed the uid/gid of the httpd to something else than 'nobody'
and 'nogroup', but that didn't help.

Anybody know what I'm doing wrong? Or, does anybody know how to use
mail from within executable Python scripts?

All suggestions are appreciated!

Casper Stoel (cbs@ascinc.com)

--