Hi All ~

 From the web tutorials I have doctored the script below together which 
leaves me with three questions:

1) Why do I receive an error if i omit the print line immediately after 
the REBOL [] header?
2)  How can I insert LFs in the line        " emit [ mold var  mold 
value ]" to make the mail more readable?
3) How can i do the set-net stuff permanently?

Thanks again for any help!

Kai




 #! /usr/local/bin/rebol -cs
   REBOL []
   print "Content-type: text/html^/"
   response: make string! 2000
   emit: func [data] [repend response data]
   read-cgi: func [
        /local data buffer
    ][
        switch system/options/cgi/request-method [
            "POST" [
                data: make string! 1020
                buffer: make string! 16380
                while [positive? read-io system/ports/input buffer 16380][
                    append data buffer
                    clear buffer
                ]
            ]
            "GET" [data: system/options/cgi/query-string]
        ]
        data
    ]
    foreach [var value] decode-cgi read-cgi [
        emit [ mold var  mold value ]
    ]
    set-net[ [EMAIL PROTECTED] smtp.telus.net ]

    header: make system/standard/email [
        To: [EMAIL PROTECTED]
        From: [EMAIL PROTECTED]
        Subject: "Message with a header"
        Organization: "Super Org"
    ]
    send/header [EMAIL PROTECTED] response header


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to