Email
WebSuite includes programmatic support for SMTP mail services such as FORMMAIL and AUTORESPONDERS. These are implemented utilizing the SDMAIL.FLB file located in the windows directory. This is the primary mail component written in FGL. Source for the library as well as FORMMAIL and AUTORESPONDER is available from the download portion of the West Coast Web Adventures web site.
The sample FORMMAIL code is:
<[
// FORMMAIL.AP
LIBRARY sdmail
session = new( "session", param( 1 ), param( 2 ) )
mail = new( "sendmail", session )
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@westcoastwebadventures.com"
mail.tohost = ""
mail.from = "webmaster@westcoastwebadventures.com"
mail.fromhost = ""
mail.subject = form_title
mail.msg = "Data submitted on " + date( "MMMM DD, YYYY" )
mail.msg += " at " + timetostr( time( ), 0 ) + "m\r\n"
cnt = chrcount( ";", req_fields ) + 1
for ( i=1; i<=cnt; i++ )
fieldname = strextract( req_fields, ";", i )
mail.msg += fieldname + "="
mail.msg += session.var( fieldname ) + "\r\n"
end
mail.send( )
if ( ! strempty( returl ) )
session.redir( returl )
end
return( 1 )
]>
|
WebSuite does not directly implement POP3 mail functionality, however it fully supports 3rd party POP3 mail servers housed within the same server box.
(c) 2001 by West Coast Web Adventures, Inc., All Rights Reserved
|