|
sarge -> RE: custom confirmation with CDOSYS (11/11/2007 6:27:27)
|
I never know how to line up the line number in an error with the line numbers in Frontpage, but I've established that the error line is: strBody = strBody & "ID = " & FP_Confirmfield("A_ID") & Chr(13)&Chr(10) This is taken out of context, as it's part of the CDOSYS code, so here's the whole thing... [;)] <% '=================================================================== ' Send the results to e-mail. ' Use CDOSYS to create and send a message based on information ' entered into the form. The following lines compose and send ' the e-mail. '=================================================================== '==================================================================== ' Set up variables: ' myCDOSYSMail = A CDOSYS mail object. ' strFrom = A string containing the source e-mail address. ' strTo = A string containing the destination e-mail address. ' strSubject = A string containing the subject of the e-mail. ' strBody = A string containing the body of the e-mail. '==================================================================== Dim myCDOSYSMail Dim strFrom Dim strTo Dim strSubject Dim strBody strFrom="admin@debtdistress.info" strTo="central@debtdistress.info" strSubject="NEW ASSOCIATE member - ONLY A TEST" & Request.Form("A_ID") strBody="We have a NEW ASSOCIATE MEMBER " & Chr(13)&Chr(10)&Chr(10) strBody = strBody & "ID = " & FP_Confirmfield("A_ID") & Chr(13)&Chr(10) strBody = strBody & "name = " & FP_Confirmfield("A_name") & Chr(13)&Chr(10) strBody = strBody & "company = " & FP_Confirmfield("A_company") & Chr(13)&Chr(10) strBody = strBody & "address = " & FP_Confirmfield("A_address") & Chr(13)&Chr(10) strBody = strBody & "phone = " & FP_Confirmfield("A_phone") & Chr(13)&Chr(10) strBody = strBody & "email address = " & FP_Confirmfield("A_email") & Chr(13)&Chr(10)&Chr(10) strBody = strBody & "THIS IS ONLY A TEST" & Chr(13)&Chr(10)&Chr(10) '==================================================================== ' The SET statement creates the CDOSYS mail object in preparation ' for sending the e-mail message. '==================================================================== Set myCDOSYSMail = CreateObject("CDO.Message") myCDOSYSMail.From = strFrom myCDOSYSMail.To = strTo myCDOSYSMail.Subject = strSubject myCDOSYSMail.TextBody = strBody '==================================================================== ' The following line sends the mail message using the source e-mail, ' destination e-mail, subject, and body that were defined earlier. '==================================================================== myCDOSYSMail.Send '=== Set the CDOSYS mail object to NOTHING to free resources. Set myCDOSYSMail = Nothing %>
|
|
|
|