Forms

P

PR.

Guest
Ok, I've spent the last few days trying to work out how to get a form submission to work.

Its on out company Intranet, and I know I can use a "mailto:" in the action, but I want to do it properly.

I have looked at other sites who offer scripts which cost money. I've found one that are free like Formmail which I installed as per instructions it still didn't work :(

I'm running Win2k Server + IIS5 (no critics please)

Anyone pleaaassseee help meh :(
 
U

[UKLans]Khan

Guest
So what do you want? A user completes a form the e-mails to the relevant person?

Do you have a smtp server, if so

Install persits mail component on the server:

http://www.aspemail.com/

Then submit you form to a asp page,

send.asp

The asp page contains this:

----------------From here--------------------------

<%
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mail.url.co.uk" ' Specify a valid SMTP server
Mail.From = Request.QueryString("the form text name") ' Specify sender's address
Mail.FromName = "Web site response" ' Specify sender's name

Mail.AddAddress "address", "Name"
Mail.AddAddress "address" ' Name is optional
Mail.AddReplyTo Request.QueryString("the form text name")

Mail.Subject = Request.QueryString("subject")

On Error Resume Next
Mail.Send 'this send the e-mail
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
%>

---------------- To here--------------------------

I think that should do it,


Khan
 
O

old.LeitMotif

Guest
why use a 3rd party email component when 2k and nt4 generally provides you with a component called CDONTS, admittedly its basic but has all the functionality you need.

create a page called formemail.asp

in that page put

<%

Set obj_Mail = Server.CreateObject("CDONTS.NewMail")


obj_Mail.To = "Your Name <youremail@yourhost.com>"
obj_Mail.From = "You <youremail@yourhost.com>"
obj_Mail.Subject = "Test Mail"
obj_Mail.Body = "Test Mail Body"
obj_Mail.Send

Set obj_Mail = nothing

%>

//edit :: added the following....
modify the email address and then just call formemail.asp from your webserver you should receive an email (providing there is an smtp service running on that box), you can then modify it to take the passed parameters from the form.
 

Users who are viewing this thread

Top Bottom