Click to See Complete Forum and Search --> : Broken Submit Form Code


geek_grrrl
03-06-2003, 10:07 PM
Hellow,

I know NOTHING about asp except that to make the form found here - http://www.originalbackpackers.com.au/beta/html/bookings.html - I need to use ASP code.

My ISP told me to set mailhost as "mailrelay.primusdatacentre.com.au" and use "mailer.asp" as the action. They directed me towards a link with some ASP code to use (see http://www.aspemail.com/codesample.html) which they thought might work.

I've put the code into a form called "mailer.asp" which now contains the following code:

<%
Set Mail = Server.CreateObject("Persits.MailSender")

Mail.Host = "mailrelay.primusdatacentre.com.au"
Mail.From = "Email"
Mail.FromName = "FirstName" & "LastName"

Mail.AddAddress "andy@andrewscompany.net", "Andrew Johnson, Jr."
Mail.AddAddress "paul@paulscompany.com" ' Name is optional
Mail.AddReplyTo "jeti@jetsupport.com.au"

Mail.Subject = "Web booking enquiry"
Mail.Body = "What goes here?"

On Error Resume Next
Mail.Send
If Err <> 0 Then
___Response.Write "Error encountered: " & Err.Description
End If
%>

The problem is when I test my form - http://www.originalbackpackers.com.au/beta/html/bookings.html - I get a page telling me the asp file can't be found.

Does anyone know where I might be going wrong?

geek_grrrl
03-09-2003, 08:26 PM
Thanks Dave,

As per your recommendation the the mailer.asp page was in the same folder as the bookings.html document and spelled and capitalized exactly the same.

Strangely, now although I haven't changed anything I'm getting a new error messaqe which reads:



Microsoft VBScript compilation error '800a0408'

Invalid character

/beta/html/mailer.asp, line 18

___Response.Write "Error encountered: " & Err.Description

^

Do you have any idea what's going on?

Ribeyed
03-09-2003, 08:52 PM
hi,
remove the 2 underscores at the begining of the line.
Your code should be this:

Response.Write "Error encountered: " & Err.Description


not this:


__ Response.Write "Error encountered: " & Err.Description

geek_grrrl
03-10-2003, 05:12 PM
Good stuff. We are getting closer!

When you hit the submit button on the form - http://www.originalbackpackers.com.au/beta/html/bookings.html - you now go to the asp script. The only problem is you get an error message that says:

Error encountered: 553 5.5.4 ... Domain name required

Any clues on how to proceed?

geek_grrrl
03-11-2003, 12:11 AM
Ummm. That's the total error message displayed in my browser. There is no mention of a line in which the error may be coming from (as with previous messages).

When you say:

You may have to look that error message up in the Persits documentation on their MailSender object.

I'm not sure what you mean. Are you able to provide any more info?

Many thanks