Solved

Error on sending e-mail in ASP page.

Posted on 2004-09-07
5
294 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

840 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