%
'Submission Email Setup
fromWho = TRIM( Request.Form( "Email") )
toWho = TRIM( Request.Form( "toWho") )
Subject = TRIM( Request.Form( "Subject" ) )
Body = TRIM( Request.Form("Name") & " has responded from G.B. Tate & Sons web site, regarding Art Wanted...
" & Request.Form( "Body"))
If fromWho <> "" THEN
sendMail fromWho, toWho, Subject, Body
'Confirmation Email Setup
fromWho = TRIM( "gbt@gbtate.com" )
toWho = TRIM( Request.Form( "Email") )
Subject = TRIM( Request.Form( "Subject" ) )
Body = TRIM("" & Request.Form("Name") & ",Thank you for submitting your inquiry to G. B. Tate & Sons Fine Art. We will reply to your note as quickly as possible. In the meantime, please consider our invitation to browse our web site at www.gbtate.com.Thank you for your interest in our services...Kindest regards,Gayle (Mr.) Gayle B. TateG.B. Tate & Sons Fine Art - Online at www.gbtate.com (307) 399-3316")
sendMail fromWho, toWho, Subject, Body
'Cleanup
Set ObjCDO = Nothing
Set iConf = Nothing
Set Flds = Nothing
Response.redirect "thankyou.html"
'Any existing page can be used for the response redirect method
END IF
'Subroutine to create an email
SUB sendmail( fromWho, toWho, Subject, Body )
Dim objCDO
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Set objCDO = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail-fwd"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
.Update
End With
Set objCDO.Configuration = iConf
objCDO.From = fromWho
objCDO.To = toWho
objCDO.Subject = Subject
objCDO.HTMLBody = Body
objCDO.Send
END SUB
%>
Gayle B. Tate, American Trompe L'OeilArtist - Inquire Conveniently Online