G
Greg Maxey
I have a feedback form on my website to allow users to provide feedback.
Teh feedback form has fields for users to enter feedback and code to colect
the input and e-mail it to me. The problem is that if users fillout and
submit the form a feedback web page opens thannking them for the input. The
proplem is that if the user doesn't fill in an email address then the
results are not e-mailed.
Can someon tell me what I am missing here? Thanks.
The page is:
http://gregmaxey.mvps.org/User_Feedback.asp
The code of the response.asp is:
<%@ Language = VBscript %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
<title>Feedback Confirmation</title>
<meta name="Microsoft Theme" content="expeditn 1011, default">
</head>
<body>
<p align="center">
<!--webbot bot="Navigation" S-Type="banner" S-Orientation="horizontal"
S-Rendering="graphics" --><%
Dim MessageType, Subject, SubjectOther, Comments
Dim Username, UserEmail, ContactRequested
Dim MyBody, Mymail
'grab data from the form
MessageType= Request.Form("MessageType")
Subject= Request.Form("Subject")
SubjectOther= Request.Form("SubjectOther")
Comments= Request.Form("Comments")
Username= Request.Form("Username")
UserEmail= Request.Form("UserEmail")
ContactRequested= Request.Form("ContactRequested")
%>
</p>
<p><font size="6">T</font><font size="4">hank you for your interest in my
website and for your valuable feedback. For confirmation, the feedback
you
submitted was:</font></p>
<p>
<b>Message Type: <%= MessageType %> </b><br>
<b>Subject: <%= Subject%> </b><br>
<b>Subject Other: <%=SubjectOther %> </b><br>
<b>Comments: <%= Comments%></b> <br>
<b>Your Name: <%= Username%></b> <br>
<b>Your Email: <%= UserEmail%></b> <br>
<b>Contact Requested: <%=ContactRequested %></b>
</p>
<p><font size="4">While I value your feedback, please remember that I
that
I can't treat user feedback as a support request. I am very
active in the
Microsoft Word
newsgroups and will always try to answer any question that you post
there.</font></p>
<p><font size="4">If you'd like to change and resubmit the information you
sent,
feel free to <a href="User_Feedback.asp">go back</a> to the User Feedback
page. <a href="Index.htm">Click here</a> to go back to my home
page. Once again, thank
you very much!</font></p>
<p><font size="4">Don't forget "donations" large and small are
always welcome!!</font></p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd0" value="_s-xclick">
<p align="center">
<input type="image"
src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0"
name="submit0" alt="Make payments with PayPal - it's fast, free and
secure!">
<input type="hidden" name="encrypted0" value="-----BEGIN
PKCS7-----MIIG7QYJKoZIhvcNAQcEoIIG3jCCBtoCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCOQoD6ZLVLUWWhzQEP0fKk/zig2snv7ml5Zo8QEzSXB4yWCw4+oBcK5NTqQq3YO2/vuPHZfBtEEK7AwJVWgyPDKnxHgieP1XRKppZQxP6/Ln1QQwx/HdTZP6Cj+g21eV+F99Zk9CuISk/0BTJ/Tl5VIIKoaR+MC1AmcEOvPK3kXTELMAkGBSsOAwIaBQAwawYJKoZIhvcNAQcBMBQGCCqGSIb3DQMHBAhyCV/crOfQ+YBItWZftwYkhKdCdWZir3JaYjRZw00m+WDMmIqWEmBcymBV5aEj5cFQ8k6N33Uv7hTk4+Ekzgmwh02fejkJMLBMHLj/MYDaQIXAoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWw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FDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDUwMzE2MjEwNDM2WjAjBgkqhkiG9w0BCQQxFgQULWjdnK1B3gYnjVWHlNYnhP4fUnYwDQYJKoZIhvcNAQEBBQAEgYCs25Nn9HBOV5g+NBNdH7dtFR3Og/y9C5uJXgpjwpbje+4myHoXtH0wZwdQGZ8pJ/daqlQPx/260HIdp2dVVoxILs8vLh1XOmK9Y3q2oE/fXx7xaIiW1KRzg33mJaqFDrTS3WzRZyK9QsxL6bHgywO0Dw4JFRyliXUjPYXnCvFWMw==-----END
PKCS7-----
">
</p>
</form>
<p> </p>
<p>
</p>
<p>
<br>
</p>
<%
'create the email and send it
Set myMail=CreateObject("CDO.Message")
Mymail.From= UserEmail
Mymail.To= "(e-mail address removed)" 'change to your email
Mymail.Subject= "Website Comments from " & Username
MyBody = "Comments from the web site." & vbCrLf & vbCrLf
MyBody = MyBody & "Comments: " & Comments & vbCrLf & vbCrLf
MyBody = MyBody & "Username: " & Username & vbCrLf & vbCrLf
MyBody = MyBody & "UserEmail: " & UserEmail & vbCrLf & vbCrLf
MyBody = MyBody & "ContactRequested: " & ContactRequested & vbCrLf
myMail.TextBody= MyBody
Const cdoSchema = "http://schemas.microsoft.com/cdo/configuration/"
Mymail.Configuration.Fields.Item(cdoSchema & "sendusing") = 2
Mymail.Configuration.Fields.Item(cdoSchema & "smtpserver") = "mail.mvps.org"
Mymail.Configuration.Fields.Item(cdoSchema & "smtpserverport") = 25
Mymail.Configuration.Fields.Update
Mymail.Send
set Mymail =nothing
%>
</body>
</html>
Teh feedback form has fields for users to enter feedback and code to colect
the input and e-mail it to me. The problem is that if users fillout and
submit the form a feedback web page opens thannking them for the input. The
proplem is that if the user doesn't fill in an email address then the
results are not e-mailed.
Can someon tell me what I am missing here? Thanks.
The page is:
http://gregmaxey.mvps.org/User_Feedback.asp
The code of the response.asp is:
<%@ Language = VBscript %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
<title>Feedback Confirmation</title>
<meta name="Microsoft Theme" content="expeditn 1011, default">
</head>
<body>
<p align="center">
<!--webbot bot="Navigation" S-Type="banner" S-Orientation="horizontal"
S-Rendering="graphics" --><%
Dim MessageType, Subject, SubjectOther, Comments
Dim Username, UserEmail, ContactRequested
Dim MyBody, Mymail
'grab data from the form
MessageType= Request.Form("MessageType")
Subject= Request.Form("Subject")
SubjectOther= Request.Form("SubjectOther")
Comments= Request.Form("Comments")
Username= Request.Form("Username")
UserEmail= Request.Form("UserEmail")
ContactRequested= Request.Form("ContactRequested")
%>
</p>
<p><font size="6">T</font><font size="4">hank you for your interest in my
website and for your valuable feedback. For confirmation, the feedback
you
submitted was:</font></p>
<p>
<b>Message Type: <%= MessageType %> </b><br>
<b>Subject: <%= Subject%> </b><br>
<b>Subject Other: <%=SubjectOther %> </b><br>
<b>Comments: <%= Comments%></b> <br>
<b>Your Name: <%= Username%></b> <br>
<b>Your Email: <%= UserEmail%></b> <br>
<b>Contact Requested: <%=ContactRequested %></b>
</p>
<p><font size="4">While I value your feedback, please remember that I
that
I can't treat user feedback as a support request. I am very
active in the
Microsoft Word
newsgroups and will always try to answer any question that you post
there.</font></p>
<p><font size="4">If you'd like to change and resubmit the information you
sent,
feel free to <a href="User_Feedback.asp">go back</a> to the User Feedback
page. <a href="Index.htm">Click here</a> to go back to my home
page. Once again, thank
you very much!</font></p>
<p><font size="4">Don't forget "donations" large and small are
always welcome!!</font></p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd0" value="_s-xclick">
<p align="center">
<input type="image"
src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0"
name="submit0" alt="Make payments with PayPal - it's fast, free and
secure!">
<input type="hidden" name="encrypted0" value="-----BEGIN
PKCS7-----MIIG7QYJKoZIhvcNAQcEoIIG3jCCBtoCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCOQoD6ZLVLUWWhzQEP0fKk/zig2snv7ml5Zo8QEzSXB4yWCw4+oBcK5NTqQq3YO2/vuPHZfBtEEK7AwJVWgyPDKnxHgieP1XRKppZQxP6/Ln1QQwx/HdTZP6Cj+g21eV+F99Zk9CuISk/0BTJ/Tl5VIIKoaR+MC1AmcEOvPK3kXTELMAkGBSsOAwIaBQAwawYJKoZIhvcNAQcBMBQGCCqGSIb3DQMHBAhyCV/crOfQ+YBItWZftwYkhKdCdWZir3JaYjRZw00m+WDMmIqWEmBcymBV5aEj5cFQ8k6N33Uv7hTk4+Ekzgmwh02fejkJMLBMHLj/MYDaQIXAoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA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3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDUwMzE2MjEwNDM2WjAjBgkqhkiG9w0BCQQxFgQULWjdnK1B3gYnjVWHlNYnhP4fUnYwDQYJKoZIhvcNAQEBBQAEgYCs25Nn9HBOV5g+NBNdH7dtFR3Og/y9C5uJXgpjwpbje+4myHoXtH0wZwdQGZ8pJ/daqlQPx/260HIdp2dVVoxILs8vLh1XOmK9Y3q2oE/fXx7xaIiW1KRzg33mJaqFDrTS3WzRZyK9QsxL6bHgywO0Dw4JFRyliXUjPYXnCvFWMw==-----END
PKCS7-----
">
</p>
</form>
<p> </p>
<p>
</p>
<p>
<br>
</p>
<%
'create the email and send it
Set myMail=CreateObject("CDO.Message")
Mymail.From= UserEmail
Mymail.To= "(e-mail address removed)" 'change to your email
Mymail.Subject= "Website Comments from " & Username
MyBody = "Comments from the web site." & vbCrLf & vbCrLf
MyBody = MyBody & "Comments: " & Comments & vbCrLf & vbCrLf
MyBody = MyBody & "Username: " & Username & vbCrLf & vbCrLf
MyBody = MyBody & "UserEmail: " & UserEmail & vbCrLf & vbCrLf
MyBody = MyBody & "ContactRequested: " & ContactRequested & vbCrLf
myMail.TextBody= MyBody
Const cdoSchema = "http://schemas.microsoft.com/cdo/configuration/"
Mymail.Configuration.Fields.Item(cdoSchema & "sendusing") = 2
Mymail.Configuration.Fields.Item(cdoSchema & "smtpserver") = "mail.mvps.org"
Mymail.Configuration.Fields.Item(cdoSchema & "smtpserverport") = 25
Mymail.Configuration.Fields.Update
Mymail.Send
set Mymail =nothing
%>
</body>
</html>