?
Solved

Error on sending e-mail in ASP page.

Posted on 2004-09-07
5
Medium Priority
?
304 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
4 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

862 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