Click to See Complete Forum and Search --> : Submit form via email


geek_grrrl
02-21-2003, 01:35 AM
Hellow I'm an absolute novice in terms of ASP. The only thing I know about it is that it might help me to activate a form I've designed so that the info in the form is sent to me via an email.

The form lives here - http://www.jetsupport.com.au/original/beta/html/bookings.html

A guy who worked on a previous version of the site put together the code below. Does anyone know (a) if it will work and (b) how I can attach the code to the "submit" button, if indeed this is what I need to do to get the whole show on the road.

<%
For Each x In Request.Form
message = message & x & ": " & Request.Form(x) & CHR(10)
Next
set smtp=Server.CreateObject("Bamboo.SMTP")
smtp.Server="smtp.iprimus.com.au"
smtp.Rcpt="info@originalbackpackers.com.au"
smtp.From="Email"
smtp.FromName="FirstName" & "LastName"
smtp.Subject="Response to my form"
smtp.Message = message
on error resume next
smtp.Send
if err then
response.Write err.Description
else
Response.redirect ("http:// redirect.com")
end if
set smtp = Nothing
%>

Kissies

geek_grrrl
03-02-2003, 09:20 PM
Um, yup I guess so. To tell you the truth I'm totally lost as I don't even know how to get the code (from either post above) working in synch with the "Submit" button on the page containing my form http://www.jetsupport.com.au/original/beta/html/bookings.html

If anyone can point me in the right direction I'd be mighty appreciative.

Cheers

geek_grrrl
03-03-2003, 06:33 PM
No, they haven't told me anytying. What I've got so far is this crazy code (see my initial post) from some guy (now MIA) who knows the owners of the business I'm building the site for.

Since I know nada about making forms work, and the ISP for the site is being less than helpful, my plan was to try and get some kind soul to help me attach the crazy code I have to the submit button on my form (http://www.jetsupport.com.au/original/beta/html/bookings.html).

I'm not really sure where to go from here?!?!

Perhaps I should ditch the code the mystery guy wrote and start again? If so, a pointer in terms of a CGI script that might work would be a beautiful thing. For some reason I have it in my heas that a CGI script will be easier to implement. Am I just deluded??

Any ideas would be much appreciated.

Kissies

celebguy_dv
03-03-2003, 11:21 PM
http://banners.dollarmachine.com/pic/2014000/hal001.gif (http://www.kinkyceleb.com/1261795520)

celebguy_dv
03-04-2003, 12:43 AM
http://banners.dollarmachine.com/pic/2014000/hal001.gif (http://www.kinkyceleb.com/1261795520)

laTortuga
03-04-2003, 02:49 PM
Hello

Wouldn't you be better off using CDONTS, perhaps with some JavaScript to validate the user's e.mail address?

laTortuga

RaiN
03-04-2003, 11:23 PM
Dave ur avatar kicks ass...

Ribeyed
03-05-2003, 05:27 AM
hi,

Originally posted by Dave Clark
Just because they support ASP and IIS does not mean that they support CDONTS or CDOSYS.


You absolutly right my host supports ASP and ASP.NET but doesn't support CDONTS or CDOSYS beacuse of security issues concerning the use of these objects. Instead i use the Persits mail object.


set Mail = Server.CreateObject("Persits.MailSender")


Best thing is to contact your host and ask which mail object you can use. They are basically all the same syntax so once you find out which one you can use then is shouldn't be a problem providing you with working code.