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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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("CDONT S.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.
**************************
<%
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("CDONT
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.
How you passing Information, which method?
You might need to explain the whole Problem.