Link to home
Start Free TrialLog in
Avatar of kevindonoghue
kevindonoghue

asked on

Forms And asp

Hi Im using Dreamweaver Mx and having problems with the forms i have designed. My server is a windows based server and the cgibin used ASP. The forms are online but no info is being forwarded . can I have this info emailed to myself?
Avatar of Saqib Khan
Saqib Khan
Flag of United States of America image

What is the Action of your Form?

How you passing Information, which method?

You might need to explain the whole Problem.
ASKER CERTIFIED SOLUTION
Avatar of mrichmon
mrichmon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The same mrichmon wrote, with an example of my own. This is the code I use to send me emails through ASP. I have a page with a form pointing to another page containing this code:

****************************
<%
Dim mini, moni, toti, tuti
Dim mail, body, objMail, reply
 
   'The email where you want to send the information (probably yours)
mail = "your@email.com"

     'Get all the form data entered by the user
mini = request.form("mini")
moni = request.form("moni")
toti = request.form("toti")
tuti = request.form("tuti")
 
   'The reply to adress (mainly useless if you are sending the info to yourself)
reply = "Mail to reply <replyto@email.com>"


body = "Suscription information  " & chr(13) & chr(13)
body = body & "This are the weird called variables:" & chr(13)
body = body & "MINI: " & mini & chr(13)
body = body & "MONI: " & moni & chr(13)
'body = body & "TOTI: " & toti & chr(13)
body = body & "TUTI: " & tuti & chr(13)


'Lets send the email
     Set objMail = Server.CreateObject("CDONTS.NewMail")
     objMail.From = reply
     objMail.Subject = "New suscription pending, suscription information"
     objMail.To = mail

     objMail.Body = body
     objMail.Send
     set objMail = nothing

 %>
****************************
This page should also have some "we got your suscription, thank you, now click here" disclaimer.

Just replace the weird called variable names, should be what you need. Still I would read the devguru link mrichmon posted.

Also you might get some errors (might, probably not) while sending the email, if this happens you most likely have a minor security issue, just change some email-related stuff in your server configuration.

Best regards,

Esopo.