Solved

Error on sending e-mail in ASP page.

Posted on 2004-09-07
5
287 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
PAQed with points refunded (500)

GhostMod
Community Support Moderator
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Form submit issue 11 52
remove element from displaying on mobile devices 3 50
EIGRP Full Mesh 2 28
Firewall port opening 2 17
#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now