example - pp \internet\web\pymailcgi\cgi-bin\oneditpagesend py #!/usr/bin/python ""###############################################################################on submit in edit windowfinish writereplyor forwardin +we reuse the send tools in mailtools to construct and send the messageinstead of older manual string schemewe also inherit attachment structure composition and mime encoding for sent mails from that module cgi uploads fail in the py cgi module for binary and incompatibly-encoded textso we simply use the platform default here (cgi' parser does no better) use simple unicode encoding rules for main text and attachments too###############################################################################""import cgisyscommonhtmlos from externs import mailtools savedir 'partsuploadif not os path exists(savedir)sending mail by smtp