View Full Version : ASP problem, egad

Jul 14th, 2002, 04:38 AM

I went there and followed the directions and copied their form for testing, and uploaded it here:


I cheated the tags, but here is the ASP code that I am trying to use.

<%@ Language=VBScript %>
<% Option Explicit %>
'The header/footer for the email.
Const strHeader = "Here are the results of the form:"
Const strFooter = "Form mailer created by 4GuysFromRolla.com, 1999"

'Who does this go to?
Const strTo = "[email protected]"

'This information is optional
Dim strFrom, strSubject, strRedirectURL, strFromPath

strFrom = Request.Form("txtSendToEmailAddress")
if Len(strFrom) = 0 then strFrom = strTo

strSubject = Request.Form("txtEmailSubject")
if Len(strSubject) = 0 then strSubject = "FORM EMAILER: 4GuysFromRolla.com, 1999"

strRedirectURL = Request.Form("urlSendTo")
if Len(strRedirectURL) = 0 then strRedirectURL = "/"

strFromPath = Request.Form("urlFromPath")
if Len(strFromPath) = 0 then strFromPath = "UNKNOWN"

Dim strBody
strBody = strHeader & vbCrLf & vbCrLf
strBody = strBody & "FORM: " & strFromPath & vbCrLf & _
"FORM submitted at " & Now() & vbCrLf & vbCrLf

Dim myElement
For Each myElement in Request.Form
Select Case Left(myElement,3)
Case "txt","sel","rad":
strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _
": "
if Len(Request.Form(myElement)) = 0 then
strBody = strBody & "UNANSWERED"
strBody = strBody & Request.Form(myElement)
end if

strBody = strBody & vbCrLf

Case "chk":
strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _
": " & Request.Form(myElement) & vbCrLf
End Select

strBody = strBody & vbCrLf & strFooter

'Time to send the email
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = strTo
objCDO.From = strFrom

objCDO.Subject = strSubject
objCDO.Body = strBody


Set objCDO = Nothing

Response.Redirect strRedirectURL

It still needs some 'fine tuning' but thats for as soon as I get it to work. All that happens with my form is an error. I am pretty darn sure that brinksters supports asp.

Jul 14th, 2002, 06:20 PM
If you have a "free" brinkster account, it doesn't allow you to send CDONTS mail - you have to pay for that.

It would usually be helpful to post the error you're getting - but if the above is the case, I know what it is... "permission denied" - right? :(

Jul 14th, 2002, 08:04 PM
Well, here is what you get with their free service...it says ASP, but I don't know about the component part of it...

Cost: FREE

Redundant Web Servers
30 MB of Web Space
500 MB/Mnth Data Xfer
NO Email Accounts
Web Based File Mgr
.NET v1 / MMIT v1
ASP 3.0
NO Domain Name
NO ASP Components

Um, permission denied? Actually, I get...

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

I don't know about the free stuff, I do suppose I will go check here.

Jul 14th, 2002, 08:43 PM
ah nevermind the ASP stuff, i just used that link at the bottom of your post whammy....works perfect. :)

Jul 16th, 2002, 01:24 AM

P.S. To find out EXACTLY what error you're getting, turn off "Show friendly HTTP errors" under Tools/Internet Options/Advanced in IE.

It's pretty obvious from what you typed that you don't have that disabled - which is very useful if you're programming in ASP.


Jul 16th, 2002, 01:32 AM
Ah, well I flipped that off, thanks for the tip! :)