% If Request.Form("Submit") <> "" Then 'This is the email address you want to send to. Const ToEmail = "lsharrow@dionlabel.com" 'This is the email address the mail will be from 'Change it to FromEmail = Request.Form("form.email") if you want to capture a field element Const FromEmail = "lsharrow@dionlabel.com" 'Static Email address 'FromEmail = Request.Form("form.comment") 'Pulled from form. 'Subject Const Subject = "Dion Label Quote Request" 'Page to send the user to once you're done sending the email. Const ThankYouPage = "thanks.htm" Dim Body, fieldName, fieldValue, ix For ix = 1 to Request.Form.Count fieldName = Replace(Request.Form.Key(ix),"_"," ") fieldValue = Request.Form.Item(ix) Body = Body & fieldName & ": " & fieldValue & VbCrLf Next Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail") objCDO.From = FromEmail objCDO.To = Toemail objCDO.Subject = Subject objCDO.Body = Body objCDO.Send() Set objCDO = Nothing Response.Redirect(ThankYouPage) End If %>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||