% 'Process the form, if its submitted If request("sendit")="1" Then 'redirect page - form goes here after submit dim redirectPage redirectPage="thankyou.htm" 'The address to which we're sending Dim toAddress toAddress="info@beresheetballet.org" 'the name to which we're sending dim toName toName="BereSheet Ballet" 'the address from which we're sending dim fromAddress fromAddress="info@beresheetballet.org" 'the name from which we're sending dim fromName fromName="BereSheetBallet.org" 'the subject line dim subjectLine subjectLine="Order Submitted from BereSheetBallet.org" 'the mail server dim mailserver mailserver="63.74.113.86" 'create the string that will be the body of the email Dim bodyText bodyText="---------------------------------------------------------" & vbcrlf bodyText= bodytext & "An order has been submitted from the website" & vbcrlf bodyText= bodytext & "---------------------------------------------------------" & vbcrlf & vbcrlf bodyText= bodytext & "Name: " & request("name") & vbcrlf & vbcrlf bodyText= bodytext & "Address: " & request("address") & vbcrlf & vbcrlf bodyText= bodytext & "Zipcode: " & request("zipcode") & vbcrlf & vbcrlf bodyText= bodytext & "Phone: " & request("phone") & vbcrlf & vbcrlf bodyText= bodytext & "Videos Requested: " & request("OrderVideo") & vbcrlf & vbcrlf bodyText= bodytext & "Recipes Requested: " & request("recipe") & vbcrlf & vbcrlf bodyText= bodytext & "Comments: " & request("comments") & vbcrlf & vbcrlf bodyText= bodytext & "Time Submitted " & now() & vbcrlf 'Email it SendMail toName,toAddress,fromName,fromAddress,subjectLine,bodyText End IF 'Function used to send mail Sub SendMail(toWho, toEmail, fromWho, fromEmail, subject, body) Set Mailer = Server.CreateObject("SMTPsvg.Mailer") Mailer.FromName = fromWho Mailer.FromAddress= fromEmail Mailer.RemoteHost = mailserver Mailer.AddRecipient toWho, toEmail Mailer.Subject = subject Mailer.BodyText = body if Mailer.SendMail then Response.redirect(redirectPage) Else Response.Write "Mail send failure. Error was " & Mailer.Response end if End Sub %>
Site Contents ©2003 Bere'Sheet Ballet. An Aer!kuh, Ltd. Production |