GoDaddy script problems, Dave!

Discussion in 'ASP General' started by jp2code, Sep 13, 2007.

  1. jp2code

    jp2code Guest

    Some time ago, one of the guys on here named Dave gave me a sample script
    for sending emails using Classic ASP on a website hosted by GoDaddy.

    GoDaddy includes their gdform.asp for collecting information on a form and
    submitting it, but the format of the message that is sent to me can not be
    modified because GoDaddy has their own script that acts upon the gdform.asp
    script. Rats!

    Anyway, I've got a page that uses Dave's example below.

    The page loads, I can fill in information, click my submit button, and
    everything seems to work.

    Except - the email message never arrives!

    Is there a way to do some error checking on the code below? Are the more
    options I could include to ensure my message arrives?

    Thanks in advance!

    Dave's code follows:

    --- On 8/3/2007 at 3:19 PM in response to the thread titled "non-ASP speaker
    with gdform.asp problems", "Dave" wrote:
    > You are NOT required to use GDFORM on GoDaddy. You just have to know
    > something about ASP programming and how to use CDONTS.
    >
    > Here is the code I use to process a contact form and send me an email:
    >
    > <%@ Language="VBSCRIPT" %>
    > <%
    >
    > If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
    >
    > Dim objMail
    > Set objMail = Server.CreateObject("CDONTS.NewMail")
    >
    > objMail.From = Request.Form("email")
    > objMail.Subject = "Contact Form"
    > objMail.To = ""
    > objMail.Body = "Name: " & Request.Form("name") & vbcrlf & "Email: " &
    > Request.Form("email") & vbcrlf & vbcrlf & Request.Form("comments")
    > objMail.Send
    >
    > set objMail = nothing
    >
    > End If
    >
    > %>
    >
    jp2code, Sep 13, 2007
    #1
    1. Advertising

  2. jp2code

    jp2code Guest

    Thanks McKirahan.

    I had noticed after some time that I was using the outdated CDONTS instead
    of the CDOSYS like you included in your response.

    My form(s) work now!

    "McKirahan" wrote:
    > Try this with your GoDaddy page:
    >
    > <%@ Language="VBSCRIPT" %>
    > <% If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
    > '*
    > '* Send Email
    > '*
    > Dim strBOD
    > strBOD = "Name: " & Request.Form("name") & vbCrLf _
    > & "Email: " & Request.Form("email") & vbCrLf & vbCrLf _
    > & Request.Form("comments")
    > Dim objCFG
    > Set objCFG = Server.CreateObject("CDO.Configuration")
    > objCFG.Fields.Item(aCDO & "sendusing") = 2
    > objCFG.Fields.Item(aCDO & "smtpserver") =
    > "relay-hosting.secureserver.net"
    > objCFG.Fields.Item(aCDO & "smtpserverport") = 25
    > objCFG.Fields.Update
    > Dim objCDO
    > Set objCDO = Server.CreateObject("CDO.Message")
    > objCDO.Configuration = objCFG
    > objCDO.From = Request.Form("email")
    > objCDO.To = ""
    > objCDO.Subject = "Contact Form"
    > objCDO.TextBody = strBOD
    > objCDO.Send
    > Set objCDO = Nothing
    > Set objCFG = Nothing
    > End If
    > %>
    >
    >
    >
    > GoDaddy Help Center:
    >
    > How Do I Use CDOSYS to Send Email?
    > http://help.godaddy.com/article.php?article_id=1073
    >
    >
    jp2code, Sep 24, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Toby Inkster

    Dave G, I dispair!!!

    Toby Inkster, Sep 5, 2005, in forum: HTML
    Replies:
    15
    Views:
    620
    Neredbojias
    Sep 7, 2005
  2. Sockets (Dave Brueck)

    , Apr 11, 2005, in forum: Python
    Replies:
    0
    Views:
    257
  3. Jeff Clark

    web dave exposed. dang - help

    Jeff Clark, Nov 16, 2003, in forum: ASP General
    Replies:
    2
    Views:
    105
    Bullschmidt
    Nov 18, 2003
  4. Cousin Brucey

    Dave Anderson is here!

    Cousin Brucey, Jun 6, 2004, in forum: ASP General
    Replies:
    6
    Views:
    111
    Mâck©®
    Jun 7, 2004
  5. perl script at godaddy

    , Mar 28, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    374
    Gunnar Hjalmarsson
    Apr 1, 2005
Loading...

Share This Page