Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder bacterozoid's Avatar
    Join Date
    Jun 2002
    Location
    USA
    Posts
    490
    Thanks
    24
    Thanked 35 Times in 35 Posts

    ASP problem, egad

    http://www.4guysfromrolla.com/webtech/071599-1.shtml

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

    http://www21.brinkster.com/jonshtmlhelp/formasptest.htm


    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 = "dbz_fan_63@hotmail.com"

    '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"
    else
    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
    Next

    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

    objCDO.Send

    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.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #3
    Regular Coder bacterozoid's Avatar
    Join Date
    Jun 2002
    Location
    USA
    Posts
    490
    Thanks
    24
    Thanked 35 Times in 35 Posts
    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.
    Last edited by bacterozoid; 07-14-2002 at 07:06 PM.

  • #4
    Regular Coder bacterozoid's Avatar
    Join Date
    Jun 2002
    Location
    USA
    Posts
    490
    Thanks
    24
    Thanked 35 Times in 35 Posts
    ah nevermind the ASP stuff, i just used that link at the bottom of your post whammy....works perfect.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts


    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.

    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #6
    Regular Coder bacterozoid's Avatar
    Join Date
    Jun 2002
    Location
    USA
    Posts
    490
    Thanks
    24
    Thanked 35 Times in 35 Posts
    Ah, well I flipped that off, thanks for the tip!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •