Solved

Error on sending e-mail in ASP page.

Posted on 2004-09-07
5
293 Views
Last Modified: 2013-11-30
I developed a website which is hosted by an external provider on an external Windows server.

Now I have an .asp page on which visitors can complete a form and after they submit the form the information will be sent to my mailbox. (behind the scene).
I found some code to do that and this code works when I test it local on my PC, but I get an error when I upload it and use it on the server.

The Error :

      CDO.Configuration.1 error '80004002'

      No such interface supported

      /site/emailConfirmation.asp, line 84



Please find below my code.

'---@@@@@@@@@@@@@@ START CODE @@@@@@@@@@@@@@@@@---
   Dim objCDO, objConf, objF

   Const cdoSendUsingPort = 2
   Const Mailserver = "www.mymailserver.com"
   Set objCDO = Server.CreateObject("CDO.Message")
   Set objConf = Server.CreateObject("CDO.Configuration")
   '---@@@The line below gives the error@@@---
   Set objF = objConf.Fields
   '---@@@The line above gives the error@@@---  
   objF.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
   objF.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = Mailserver
   objF.Update
            
   Set objCDO.Configuration = objConf
   objCDO.From = "E-mailaddressFrom"
   objCDO.To = "E-mailaddressTo"
   objCDO.Subject = "My Subject"            
   objCDO.HtmlBody = strBody
   objCDO.Send
            
   'Cleanup
   Set ObjCDO = Nothing
   Set objConf = Nothing
   Set objF = Nothing
'---@@@@@@@@@@@@@@ STOP CODE @@@@@@@@@@@@@@@@@---

Can someone help me on this error. Perhaps give some other code or maybe give me some advise what to tell to my webhost.

Tx in advance.
K.
0
Comment
Question by:claesk
  • 2
5 Comments
 

Author Comment

by:claesk
ID: 12006089
Is there no one out there who can help me? This question is extremely important to me and rather very urgent.
Kind regards,
K.
0
 

Expert Comment

by:ice2404
ID: 12006334
Yu  are trying to send mail using CDONTS and it seems your web host isn't using CDONTS. They may be using IIS 6.
Check with your host
0
 

Author Comment

by:claesk
ID: 12006537
I just (a few minutes ago) found a solution myself. This topic can be closed/deleted. I reduced the code and now it works. This is what I use now :

   Set objCDO = Server.CreateObject("CDO.Message")
   objCDO.From = "E-mailaddressFrom"
   objCDO.To = "E-mailaddressTo"
   objCDO.Subject = "My Subject"          
   objCDO.HtmlBody = strBody
   objCDO.Send
         
   'Cleanup
   Set ObjCDO = Nothing
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 12528529
PAQed with points refunded (500)

GhostMod
Community Support Moderator
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question