
%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% 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) = MailServer .Item(cdoSMTPServerPort) = 25 .Item(cdoSMTPconnectiontimeout) = 10 .Update End With Set objCDO.Configuration = iConf objCDO.From = fromWho objCDO.To = toWho objCDO.Subject = Subject objCDO.TextBody = Body objCDO.Send END SUB Dim Domainname Dim MailServer Dim From Dim subject1 Domainname = "adolfjewelers.com" MailServer = Request.Form("MailServer") From = "support@verio-hosting.net" subject1 = "A friend at Adolf Jewelers..." fromWho = TRIM( Request.Form( "sender_email") ) toWho = TRIM( Request.Form( "their_email") ) ' CJC 20070822: it appears that the field "comments" from the form is not observed here as it causes an error since it appears blank. Using other fields for interoperability testing for now instead Subject = TRIM( Request.Form( "their_name" ) ) Body = TRIM( Request.Form( "the_comments") ) 'fromWho = Request.Form( "fromWho") + "@adolfjewelers.com" 'toWho = "copeland@copelandcasati.com" 'Subject = TRIM( Request.Form( "Subject" ) ) 'Body = TRIM( Request.Form( "Body") ) send_mail = Request.Form( "send_mail") If send_mail <> "" THEN sendMail fromWho, toWho, Subject, Body 'Cleanup Set ObjCDO = Nothing Set iConf = Nothing Set Flds = Nothing response.Redirect("thanks-buying.html") END IF %>

