PDA

View Full Version : form submission and auto-reply


ztheged
09-05-2002, 07:31 PM
Hi folks

my problem is the following:
I have a form running on an ASP sever, handling registrations for a group. Form submission, and the script of the form page is OK, the problem is with the formmail script itself. What I want it to do is send the form contents in an e-mail to a mailbox on the server called register@... . The mailbox is configured to forward all messages to me, and additionally autoreply to the messages with a prewritten reply e-mail.

I got the formmail script from http://www.brainjar.com/asp/formmail/default.asp
and I added all hidden fields like _replyTo and so on, to make it work. But no success :confused:

My idea would be to make the formmail.asp's "from" field somehow call in the value from the form's "Emai" field... but how??

Help is very highly appreciated!

raf
09-06-2002, 12:08 PM
just cheking: you have form.html with a field named "email". you submit that form to formmail.asp where you have a fiel named "from" and you want to insert the value from form.html"email" in formmail.asp"from" ?

simple. just fill in the values like below :

<%option explicit%>
<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 4">

</head>

<body>
<form name="FormName" action="(Empty Reference!)" method="get">
<input type="text" value='<%response.write(request.form("email"))%>' size="24">
</form>
</body>

</html>

ztheged
09-06-2002, 05:11 PM
Thats what I wanna do, yea.

The code in the formmail.asp looks like

referers = Array("www.domain.com", "domain.com")
mailComp = "CDONTS"
smtpServer = "none"
fromAddr = "EMAIL VALUE SHOULD BE HERE"

Where should the code you wrote inserted? and What should this fromAddr be equal to?

Thanks alot for your help!

raf
09-17-2002, 03:08 PM
sory for late response (vacation)

the code from my previous post is complete code for asp page that shows the email adres (within a form) that was inserted in the previous form.
it only showes what was inputed in a form

it seems to mee you want to insert the data from the form in your email script and that you need to insert the email adres into the variable fromAddr

code:
fromAddr = request.form("email")


(This line inserts the content of the fiel named 'email' on the form)

i can't open the url you posted, so I couldn't look further into this.

Dean
09-30-2002, 05:57 PM
hi ztheged

I have been working on this today my self.

The line of code where it says ("www.domain.com", "domain.com")

You simply put the domainname of your site i.e. ("www.ztheged.com", "ztheged.com")
then in your page you need to create a couple of hidden fields.
Here are the 4 fields that formmail.asp needs in your form to get it send an email.
1.[list=1]
_recipients
_subject
_redirect
email
[/list=1]

If you look at the attached formmailhelp.txt it will explain what each of these fields are for and some of the other formmail.asp useful bits of code.

simply put. once you have the form looking the way you want then simply put the email address you want to sent the emails to in a hidden field called "_recipients" .

then put a hidden field called "_subject" and type in what you want the title of the email to say.

Then make sure that the box the user types thier emial address is in is called "email".
then one final hidden field called "_redirect" which holds the url for the page you want to send the user to after they fill out the form.

Hope this helps:thumbsup:

whammy
10-01-2002, 02:10 AM
If you are using ASP, and your server can use CDONTS then why are you using a form script provided by someone else?

:confused:

I have a similar FormMail script on my website, which is provided free of charge to people that only know HTML, or can't afford access to a server-side scripting language - but I would urge you to check out this link so you can implement your own:

http://www.aspfaqs.com/aspfaqs/ShowCategory.asp?CatID=10

:D

Dean
10-14-2002, 04:17 PM
Cheers for the link.

Something else for me to bury my head into and see if i can master Isn't programming just such fun ha ha ha:thumbsup: :thumbsup: :thumbsup: