martijnvandelaa
01-11-2003, 12:32 AM
How can I sort the variables to appear in my e-mail?
Normally I use CGI mailscritps on my websites, but this time the ISP does not support CGI :(, so I have to use ASP. This is something I have never used before. So far everything I did worked well :) accept the order in wich the variables appear in my email. Can I sort this in some way, so that the mail is readable.
This is the code I am using right now:
<%
on error resume next
Set Mailer = Server.CreateObject("CDONTS.NewMail")
MailTo = "****@****"
if request("_from") = "" then
MailFrom = "****@****"
else
MailFrom = request("_from")
end if
if request("_subject") = "" then
Subject = "Offerte aanvraag - Aluminium Ramen"
else
Subject = request("_subject")
end if
Mailer.From = MailFrom
Mailer.To = MailTo
Mailer.Subject = Subject
for each whatever in request.querystring
Message = Message & whatever & "=" & vbcrlf
Message = Message & request.querystring(whatever) & vbcrlf
next
for each whatever in request.form
Message = Message & whatever & "=" & vbcrlf
Message = Message & request.form(whatever) & vbcrlf
next
Mailer.Body = Message
Mailer.Send
Set Mailer = nothing
response.redirect "bedankt_ramen.html"
%>
You can find the form at the following link:
www.i-cre8.nl/marex/contact/formulier_ramen.html
Normally I use CGI mailscritps on my websites, but this time the ISP does not support CGI :(, so I have to use ASP. This is something I have never used before. So far everything I did worked well :) accept the order in wich the variables appear in my email. Can I sort this in some way, so that the mail is readable.
This is the code I am using right now:
<%
on error resume next
Set Mailer = Server.CreateObject("CDONTS.NewMail")
MailTo = "****@****"
if request("_from") = "" then
MailFrom = "****@****"
else
MailFrom = request("_from")
end if
if request("_subject") = "" then
Subject = "Offerte aanvraag - Aluminium Ramen"
else
Subject = request("_subject")
end if
Mailer.From = MailFrom
Mailer.To = MailTo
Mailer.Subject = Subject
for each whatever in request.querystring
Message = Message & whatever & "=" & vbcrlf
Message = Message & request.querystring(whatever) & vbcrlf
next
for each whatever in request.form
Message = Message & whatever & "=" & vbcrlf
Message = Message & request.form(whatever) & vbcrlf
next
Mailer.Body = Message
Mailer.Send
Set Mailer = nothing
response.redirect "bedankt_ramen.html"
%>
You can find the form at the following link:
www.i-cre8.nl/marex/contact/formulier_ramen.html