<% @ language="VBScript"%> <% Function formatText(ByVal theText) theText=replace(theText,vbCRLF&vbCRLF,"

") theText=replace(theText,vbCRLF,"
") formattext=theText END FUNCTION 'Procedure to send email sub sendmail(fromwho,towho,subject,body) dim mymail set mymail=server.CreateObject("CDONTS.NewMail") mymail.From=fromwho mymail.To=towho mymail.Subject=subject mymail.Body=body mymail.MailFormat=0 mymail.BodyFormat=0 mymail.Send set mymail=nothing end sub FromWho=trim(Request.Form("FromWho")) ToWho=trim(Request.Form("recipient")) Subject=trim(Request.Form("subject")) bgcolor=trim(Request.Form("bgcolor")) backurl=trim(Request.Form("backurl")) dim Body Body="

" order=Request.Form("order") orderArray=split(order,",",-1,1) for each x in orderArray for each thing in Request.Form if(trim(Request.Form(thing))<>"" and thing <> "B1" and thing <> "order" and x=thing)then Body=Body& "" end if next next Body=Body&"
"& thing & "" &formatText(trim(Request.Form(thing)))&"
" if (FromWho <> "" ) Then sendmail FromWho,ToWho,Subject,Body 'Response.Write(Body) End If %>