Asp Email Dump

Results 1 to 2 of 2

Thread: Asp Email Dump

  1. #1
    Join Date
    Dec 1969

    Default Asp Email Dump

    trying to create an Email dump for form data:<BR><BR>&#060;%@language=Vbscript%&#062;<BR>& #060;%response.buffer=true%&#062;<BR><BR>&#060;%<B R><BR><BR>dim FName<BR>dim LName<BR>dim BName<BR>dim Address<BR>dim City<BR>dim Province<BR>dim PostalCode<BR>dim Phone<BR>dim Fax<BR>dim Email<BR>dim Request<BR><BR>FName=Request.Querystring("FirstNam e")<BR>LName=Request.QueryString("LastName")<BR>BN ame=Request.QueryString("BusinessName")<BR>Address =Request.QueryString("Address")<BR>City=Request.Qu eryString("City")<BR>Province=Request.QueryString( "Province")<BR>PostalCode=Request.QueryString("Pos talCode")<BR>Phone=Request.QueryString("Phone")<BR >Fax=Request.QueryString("Fax")<BR>Email=Request.Q ueryString("Email")<BR>Request=Request.QueryString ("Request")<BR><BR>dim Mail<BR>Set Mail=Server.CreateObject("CDONTS.NewMail")<BR>Mail .To=""<BR>Mail.From= Email<BR>Mail.Subject="Website Inquiry"<BR>Mail.Send FName,LName,BName,Address,City,Province,PostalCode ,Phone,Fax,Email,Request (this is all on one line breaks needed)<BR>set mail=nothing<BR><BR>location.href= "/sent.htm" <BR><BR><BR>On Error Resume Next<BR>If Err&#060;&#062; 0 Then<BR>Response.Write "Error encountered: " & err.description<BR>End If <BR><BR>%&#062;<BR><BR>the error that i&#039;m getting is :<BR><BR>Microsoft VBScript runtime error &#039;800a01a8&#039; <BR><BR>Object required: " (double quote included with error)<BR><BR>/InquiryEmail2.asp, line 19 (being the first line of the variable assignments(FName=Request.Querystring("FirstName") ))<BR><BR>any ideas as to what&#039;s wrong? <BR>

  2. #2
    Join Date
    Dec 1969

    Default Pretty bizarre...

    I think the line number is totally bogus.<BR><BR>I think the error is actually on the line:<BR><BR>location.href = "/sent.htm"<BR><BR>That is *NOT* valid ASP code! That is *CLIENT SIDE* code and can *NOT* be put inside the &#060;%...%&#062; marks of ASP.<BR><BR>Also, you ON ERROR RESUME NEXT is completely bogus.<BR><BR>You are misundestanding how On Error works.<BR><BR>That line and the 3 lines which directly follow it are doing absolutely nothing of any use.<BR><BR>You have to put ON ERROR RESUME NEXT *before* the place where you might want to ignore an error. <BR><BR>Other than that...<BR><BR>Why are you passing this stuff via a querystring??? It would be real easy for somebody to put in text in a message that would be too long for a querystring. You&#039;d be a lot better off using &#060;FORM ...METHOD=POST&#062; instead.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts