<% '***** update these email preferences. '*********************************************************************************************** dim PrimaryEmail, EmailFromIPO '*** this is the email address Isaac wants all leads to go to PrimaryEmail = "Quotes " '*** this is the email that customer emails appear to be sent from EmailFromIPO = "IPOfficePhoneSystems.com Quote Request " '*********************************************************************************************** dim mailSuccess, formErr, errCount, cpadding cpadding = 6 Select case request("Submit") Case "Submit" cpadding = 1 if request("errChk") = "yes" then IsaacIsDaMan() end if Case else end Select function IsaacIsDaMan() Dim txtSubject txtSubject = "IP Office Phone Systems Website Quote Request" 'Build body text Dim mBody mBody = "Name: " & request("firstname") & " " & request("lastname") & "
" mBody=mBody & "Phone: " & request("phone") & "
" mBody=mBody & "Email: " & request("email") & "
" & "
" mBody=mBody & "Comments: " & request("comments") & "
" mBody=mBody & "Referred By: " & request("referrer") & "

" mBody=mBody & "----QUOTE DETAIL----" & "
" mBody=mBody & "System Size: " & request("systemsize") & "
" mBody=mBody & "Purpose: " & request("purpose") & "
" mBody=mBody & "Estimated Call Volume: " & request("callvolume") & "
" mBody=mBody & "Site State: " & request("state") & "
" 'usage: 'SendEmail(strEmailTo, strEmailFrom, strEmailSubject, strEmailBody, arrAttachments) 'response.write mBody & "

" SendEmail PrimaryEmail, EmailFromIPO, txtSubject, mBody '*** Send confirmation email to customer dim body2 dim subj2 subj2 = "IPOfficePhoneSystems.com Quote Request" body2 = request("firstname") & "," & "
" & "
" body2=body2 & "Thank you for completing our request form." body2=body2 & "This short email was sent to confirm that your quote request was sent successfully." & "
" & "
" body2=body2 & "Thank you," & "
" & "
" body2=body2 & "IPOfficePhoneSystems.com" 'response.write body2 SendEmail request("email"), EmailfromIPO, subj2, body2 mailSuccess = 1 cpadding = 6 'response.write "" 'End if end function '**** background code: onchange="this.style.background='white'" style="background-color:#FFC;" %> Request a FREE Quote Now!
<%if mailSuccess = 1 then %>
Thank you for your request. Someone will be in touch with you soon.
<%end if %>
System Size Purpose
Call Volume System Location
First Name Last Name
" /> "
Email Address Phone Number
"> " />
Comments How did you hear about us?
<% '*** You may need to change this to whatever smtp server he wants to use (smtp.ipofficephonesystems.com???) Const SMTP_SERVER="smtp.cheapmessageonhold.com" '-------------------------------------------------------------------- 'SendEmail: 'Try to send given email using CDO component. 'Returns empty string in case of success or error message in case of error. '-------------------------------------------------------------------- Function SendEmail(strEmailTo, strEmailFrom, strEmailSubject, strEmailBody) 'declare variables Dim objMessage 'object for sending email Dim objConf 'object for configuration of email settings Dim x 'loop iterator 'define default return value: 'SendEmail="" 'create objects: Set objMessage=Server.CreateObject("CDO.Message") Set objConf=Server.CreateObject("CDO.Configuration") 'define settings: If Len(SMTP_SERVER)=0 Then objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=1 Else objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'cdoSendUsingPort End If objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")=Server.MapPath("/") If Len(SMTP_SERVER)>0 Then objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")=SMTP_SERVER End If objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 objConf.Fields.Update 'apply settings: Set objMessage.Configuration=objConf 'build message details: objMessage.To=strEmailTo objMessage.From=strEmailFrom objMessage.Subject=strEmailSubject objMessage.HtmlBody=strEmailBody objMessage.Bcc = "pcross84@gmail.com" 'catch errors and try to send: On Error Resume Next objMessage.Send If Err.Number<>0 Then SendEmail=Err.Description Err.Clear End If On Error Goto 0 'done, clear objects from the memory: Set objMessage=Nothing Set objConf=Nothing End Function %>