Post , UrlDecode, and Ampersand
katir at hindu.org
katir at hindu.org
Sun Dec 21 21:17:09 EST 2003
Please exuse last post which had an entire email stuck in the subject line... .. working with a home made email client where I got some old email stuck underneath in the subject line...
Ok, Dave and Ken --this turned out to work just fine:
on startup
if $REQUEST_METHOD is "POST" then
repeat until length(tDataIn) >= $CONTENT_LENGTH
read from stdin until empty
put it after tDataIn
end repeat
split tDataIn by "&" and "="
put "/usr/lib/sendmail -t" into mprocess
open process mprocess for write
write "From:" && (urlDecode (tDataIn["from"]))& cr to process mprocess
write "To:" && (urlDecode (tDataIn["to"])) & cr to process mprocess
write "Subject:" && (urlDecode (tDataIn["subject"])) & cr & cr to process mprocess
write (urlDecode (tDataIn["body"])) & cr to process mprocess
close process mprocess
Put "Email was sent successfully." into tResponse
put "Content-Type: text/html" & cr
put "Content-Length:" && the length of tResponse & cr & cr
put tResponse
end if
end startup
More information about the use-livecode
mailing list