?
Solved

Error on sending e-mail in ASP page.

Posted on 2004-09-07
5
Medium Priority
?
301 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

650 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