Nicole Rutter's Blog
Posted At : December 6, 2007 8:06 AM | Posted By : Nicole Rutter

Go Daddy ASP CDONTs form mail issue

Go Daddy ASP form mail issue.


I have a friend who currently has a website hosted through Go Daddy who was having form mail problems. He has had a Go Daddy account for a while now and all had been well until he decided to change his domain name. Turns out his old site was actually on an older Go Daddy server that supported CDONTS. Changing his domain name and transferring his information to his new domain placed it on a newer Go Daddy server.

ASP CDONTS has been used for quit some time and he did not expect a problem when switching domains. It was pretty evident that once he moved his site that his form mail was no longer working. The code would not throw an error it would simply not send his form mail. After spending a few hours on the phone with go daddy support the only solution they were able to provide was to use there built in gdform.asp. After careful review of the code I decided there had to be a better way. If your hosting on a Go Daddy server now I highly recommend you use CDO.Message, and if you have existing CDONTS code, that you convert it to CDO.Message now, rather than waiting until you absolutely have to.

I searched several forums only to find out that there really wasn't a good solution out there for this issue. By this time my friend was getting pretty frustrated with Go Daddy and the support that they were providing. After trying a few different ways of sending ASP form mail I finally decided to use CDO.Message. At last it worked! I hope that this blog will save you hours and hours of testing and phone calls. I think my friend owes me one ;). After figuring out the solution to the problem I did attempt to contact Go Daddy for the old domains server IIS and SMTP configuration VS the new configuration but he was unable to provide that information =) hmmm go figure.

The only thing I can think of is the old server was still on IIS 5.0...CDONTS components where standard with IIS 5.0. Understanding that microsoft removed the component from IIS 5.1 on Windows XP I would have to assume there is not a copy of the cdonts.dll on the new IIS server. Why Go Daddy decided not to support CDONTs any more who knows?

Dim Mail
set Mail=server.createobject("CDO.Message")
Mail.From = test@yahoo.com
Mail.To= test@yahoo.com
Mail.Subject = Sending form mail with GoDaddy
Mail.TextBody = This is a test message to confirm that my message is being sent
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") =2
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="relay-hosting.secureserver.net"
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =25
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") =1
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") =your email address
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") =your email password

Mail.Configuration.Fields.Update
Mail.Send
set Mail=nothing

Still confused? Check out my latest post on this issue with a working example. http://nicole.cfwebtools.com/index.cfm/2008/2/1/Go-Daddy-ASP-CDONTs-form-mail-issue-CONTINUED

Related Blog Entries

Comments
Just a note you do not have to enter a password or email address in for these two fields

("http://schemas.microsoft.com/cdo/configuration/sen...") =your email address
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sen...") =your email password
# Posted By Nicole Rutter | 12/11/07 11:50 AM
I have got your code working on GoDaddy --
Is there a way to add HTML tags to email sent?
Like a 'Set email type 1=text 0=html



This is my CDONTS code I'm trying to convert:
'Form inputs to variables
   sName = Request.Form("Name")
   Email = Request.Form("Email")
   Comments = Request.Form("Comments")
   
'Create mailbody variable
   mailbody = mailbody & "Name: " & sName & "<br />"
   mailbody = mailbody & "Email: " & Email & "<br />"
   mailbody = mailbody & "Comments: " & Comments & "<br />"


   'send email copy of meeting request
   DIM objMail
   Set objMail = Server.CreateObject("CDONTS.NewMail")
   objMail.From = Email
   objMail.Subject = "From Meeting Form"
   objMail.To = "xx@xx.com"
   'Set email type 1=text 0=html
   objMail.BodyFormat=0
   objMail.MailFormat=0
   objMail.Body = mailbody
   objMail.Send
   Set objMail = nothing

Thanks for your post!

Michelle
# Posted By Michelle | 12/23/07 8:41 AM
I am dying here trying to get this CDO mailer to work on GoDady - any insight?

<!-- EMAIL SUBMISSION -->
      <%@ Language="VBSCRIPT" %>
      <%
      
      If Request.ServerVariables("REQUEST_METHOD") = "POST" THEN
      '*
      '* SEND MAIL
      '*

      fullname = Request.Form("fullname")
      emailaddress = Request.Form("emailaddress")
      phone = Request.Form("phone")
      info = Request.Form("info")
      
      
      
            dim MessageBodyHTML
            MessageBodyHTML = "<SPAN style='font-family:arial; font-size:10pt;'><strong>FULL NAME:</strong> " & fullname & Chr(10) & _
            "<br><strong>EMAIL ADDRESS:</strong> " & emailaddress & Chr(10) & _
            "<br><strong>STREET ADDRESS:</strong> " & phone & Chr(10) & _
            "<br><strong>STREET ADDRESS (cont):</strong> " & info & Chr(10) & _

            "<br><br><strong>Date:</strong> " & date()   
            
            dim MessageBody
            MessageBody = "Name: " & Request.Form("fullname") & vbCrLf _
            & "Email: " & Request.Form("emailaddress") & vbCrLf _
            & "Phone: " & Request.Form("phone") & vbCrLf & vbCrLf _
            & Request.Form("info")
            
      '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
      '''' this is the CDO object (newer verwsion of CDONTS)
      '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
            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("emailaddress")
             objCDO.Subject = "Northport Web Contact Form"
             objCDO.To = "tymm@comcast.net"
             objCDO.TextBody = MessageBody
               objCDO.HTMLBody = MessageBodyHTML   
               
               objCDO.Send
            
            'You must always do this with CDONTS.
            set objCDO = nothing
            set objCFG = nothing
            
            End If
         
      
      %>   
      
<!-- END EMAIL SUBMISSION -->
# Posted By tymm | 1/4/08 12:48 PM
tymm glad to hear you were able to get this working. I know the gdform.asp is a little frustrating to work with. I am still testing your code to see why this isn't working. I to did not generate any initial errors on the form.
# Posted By Nicole Rutter | 1/14/08 9:12 AM
hey Nicole. I am stumbling thru some GoDaddy issues and found your site after a search. I was thrilled because it seemed you had provided a solution to my GD problem...

Here's the deal...I have successfully used their GDForm on my site...and I am using it to collect names/emails for a newsletter sign-up. The trouble began when I was trying to add a Contact Form as well...this is not working.

Your 'solution' , at this point, makes no sense to me. I was wondering if you could a) explain how to implement that code/use a form with it or b) add another instance of gdform?

I know that is complicated?? Please email me to discuss...I am struggling here!!

Thanks if you can help
# Posted By sime | 1/31/08 6:56 PM
I now have a live example up for everyone to view. This should help you out a lot!

http://nicole.cfwebtools.com/index.cfm/2008/2/1/Go...
# Posted By Nicole Rutter | 2/14/08 2:12 PM



Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.