home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 September
/
CHIPCD_9_99.iso
/
software
/
serwery_www
/
websuite
/
websuite.exe
/
FORMMAIL.AP_
/
FORMMAIL.AP
Wrap
Text File
|
1999-01-12
|
1KB
|
55 lines
<[
// FORMMAIL.AP
// (c) 1998 by SmartDesk, Inc., All Rights Reserved
//
// You are free to use this code without charge provided you
// agree to abide by the terms and conditions of the licensing
// agreement located on the SmartDesk web site (www.smartdesk.com).
LIBRARY sdmail
session = new( "session", param( 1 ), param( 2 ) )
mail = new( "sendmail", session )
// Make sure they're from your server
// ClientHost = session.data( "CLIENT_HOST" )
// if ( ClientHost != "smartdesk.com" )
// return( "" )
// end
returl = session.var( "returl" )
if ( strempty( returl ) )
returl = session.data( "REFERER" )
end
// initialize mail debugging to display connection details
// in the output window
mail.debug = 1
form_title = session.var( "form_title" )
req_fields = session.var( "req_fields" )
// mail.GetVars( )
mail.to = "webmaster@smartdesk.com"
mail.tohost = ""
mail.from = "webmaster@smartdesk.com"
mail.fromhost = ""
mail.subject = form_title
mail.msg = "Data submitted on " + date( "MMMM DD, YYYY" ) + " at " + timetostr( time( ), 0 ) + "m\r\n\r\n"
cnt = chrcount( ";", req_fields ) + 1
for ( i=1; i<=cnt; i++ )
fieldname = strextract( req_fields, ";", i )
mail.msg += fieldname + "=" + session.var( fieldname ) + "\r\n"
end
mail.send( )
if ( ! strempty( returl ) )
session.redir( returl )
end
return( 1 )
]>