Solved

cdonts.dll installation

Posted on 2004-05-01
28
1,116 Views
Last Modified: 2007-12-19
I have to develop an application in asp to send and receive mails.

the application is for use within our local intranet

system configuration:
windows 2000
iis5.0

how to install cdonts.dll?
0
Comment
Question by:Nandhini
  • 13
  • 11
  • 2
  • +1
28 Comments
 
LVL 6

Assisted Solution

by:pkaleda
pkaleda earned 20 total points
ID: 10967016
Copy the cdonts.dll to the winnt\system32 directory.  then go to start / run and type this in:

regsvr32 c:\winnt\system32\cdonts.dll

then click run.

PK
0
 
LVL 6

Expert Comment

by:pkaleda
ID: 10967020
It should be there in a standard win2000 install with IIS 5.0.  You can grab it from any 2000 machine and save it there and register it if is not there.
0
 
LVL 3

Assisted Solution

by:rajuare
rajuare earned 20 total points
ID: 10967043
When u r installing Windows 2000, bydefault it'll install cdonts component. Suppose if u want to install now ...... Go to reinstall option on windows2000 set-up select ONLY cdonts , now u can installl the cdonts ..... before that check the link below it'll tell u the about CDONTS installation/Component STATUS.

**********************************************
http://www.cognisant.co.uk/tools/testemailcomponent.asp
**********************************************
0
 
LVL 1

Author Comment

by:Nandhini
ID: 10967090
i searched for cdonts.dll file
it is there in the following paths
c:\winnt\system32
c:\winnt\servicepackfiles\i386

----------------------------------------------------------------
Set mail = Server.CreateObject("CDONTS.NewMail")

gave the following error

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/searchengine/CDONTS/send_msg.asp, line 2

Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: http://www.microsoft.com/contentredirect.asp.
0
 
LVL 3

Expert Comment

by:rajuare
ID: 10967107
Server.CreateObject Failed means cdonts is not installed or not registered. In ur case u've to install cdonts ....
0
 
LVL 1

Author Comment

by:Nandhini
ID: 10967128
I have installed cdonts

i get some error on excuting the following stmts

<%
   Set ml = Server.CreateObject("CDONTS.NewMail")
   ml.to="nandh_79@rediffmail.com"
   ml.body="hello from eskill"
   ml.send
   set ml = Nothing
%>

error stmt:

error '80070003'
/searchengine/CDONTS/send_msg.asp, line 5
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10967131
You need to setup SMTP serer. When you install SMTP server, CDONTS IS registered automatically. BTW.. If your server is running on Win2000, then i suggest that you use CDOSYS rather than CDONTS. CDOSYS is highly configurable.. unlike CDONTS.

Cheers!!
0
 
LVL 1

Author Comment

by:Nandhini
ID: 10967133
hi all,
i will get back after installing SMTP server
0
 
LVL 1

Author Comment

by:Nandhini
ID: 10967221
SMTP server is installed on a proxy server

but iis is not installed in that system

how to create the virtual directory to test my appln
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10967362
you need to setup SMTP in the server from which you are running your code from. You can configure the SMTP server to relay the mails to the internet facing server if security is an issue. Besides CDONTS wont get installed on the server if you install SMTP on some other server.

>>how to create the virtual directory to test my appln

Open the IIS console (Click Start | Run and type in Inetmgr and click OK). In the IIS console, expand the tree and select Default website. RightClick and select New Virtual Directory. Provide a name for the Virtual directory, Click Next. Now browse to the folder which contains your asp pages and set it as the directory. Click through to finish.

In the browser window, access the files in the new virtual directory by typing in http://localhost/virtualdirectoryname/filename.asp or http://servername/virtualdirectoryname/filename.asp

For more info on how to set up SMTP, refer :http://techrepublic.com.com/5100-6268-1059889-1.html

Cheers!!
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10994391
Hi, Any updates?

Cheers!!
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11029049
sorry for the delayed reply

When i send mail using the following code the mails gets stored in the queue folder and is not delivered.what's wrong

Set mobj = Server.CreateObject("CDONTS.NewMail")
mobj.to = "x@rediffmail.com"
mobj.from = "x@rediffmail.com"
mobj.subject = "hello"
mobj.body = "test message"
mobj.send
set mobj = Nothing

IIS SMTP service is now installed
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11029227
i am trying to send mail from a machine that doesn't have any mail server,but connected to a mail server.

my system has iis5.0 with smtp service
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11029657
I have also set the mail servers IP address in the smart host
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 21

Accepted Solution

by:
ap_sajith earned 210 total points
ID: 11040170
For CDONTS to work, you need to have SMTP installed on the server running the code...You can configure the SMTP server to relay to a different mail server.

Use CDOSYS if you are using IIS 5.0. Use the following subroutine to send out emails. The last parameter for the subroutine takes the mailserver name/ IP as the input... so you could virtually set any ,ail server on the network to send out the mails.

<%
' ** USAGE**
' ** CALL SendMailCDOSYS("a@b.c","x@y.z","test","test",False,"localhost")

Sub SendMailCDOSYS(strFrom,strTO,strSubject,strMailBody,blnHTML,sMailServer)
On Error Resume Next
      Dim objCDOConf,objCDOSYS
      ' ** CREATE THE E-MAIL SERVER OBJECT **
      Set objCDOSYS = Server.CreateObject("CDO.Message")
      Set objCDOConf = Server.CreateObject ("CDO.Configuration")

      ' ** SET AND UPDATE FIELDS PROPERTIES **
      With objCDOConf
            ' ** OUT GOING SMTP SERVER **
            .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sMailServer
            ' ** SMTP PORT **
            .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
            ' ** CDO PORT **
            .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
            ' ** TIMEOUT **
            .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
            .Fields.Update
      End With

      ' ** UPDATE THE CDOSYS CONFIGURATION **
      Set objCDOSYS.Configuration = objCDOConf

      With objCDOSYS    
            ' ** WHO THE E-MAIL IS FROM **
            .From = strFrom

            ' ** WHO THE E-MAIL IS SENT TO **
            .To = strTo
                        
            ' ** THE SUBJECT OF THE E-MAIL **
            .Subject = strSubject
             
            ' ** SET THE E-MAIL BODY FORMAT (HTMLBody=HTML TextBody=Plain) **
            If blnHTML = True Then
            .HTMLBody = strMailBody
            Else
            .TextBody = strMailBody
            End If
             
            ' ** SEND THE E-MAIL **
            .Send
      End with                    
        
      ' ** CLOSE THE SERVER MAIL OBJECT **
      Set objCDOSYS = Nothing
End Sub
%>


Cheers!!
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11056829
Is it possible to receive mails with CDOSYS?
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 11057342
Could you be more specific?. Are you looking for a mail client like outlook?. CDOSYS & CDONTS can be used only for sending out emails. If you are looking to retrieve emails from POP3 email boxes, then you might need to buy a POP3 email component. As far as i know, there are no free ones available. The ones's that were are no longer available for free download.

Cheers!!
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11057734
sorry for not being specific

i am trying to create an application much like outlook
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 11057756
Did you manage to send out the emails using CDOSYS?.

I think we are going off topic here. Please post a separate question.

Cheers!!
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11057840
i tested ur code today morning  but till now i didn't receive that mail
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 11057858
Post the code that you have used... Also, are you sure that you have specified the correct mail server parameter?. If you want to try and send emails to internet, then make sure that SMTP server is configured properly and the machine is connected to the internet.

Cheers!!
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11057923
<%
' ** USAGE**
' ** CALL SendMailCDOSYS("a@b.c","x@y.z","test","test",False,"localhost")

Sub SendMailCDOSYS(strFrom,strTO,strSubject,strMailBody,blnHTML,sMailServer)
On Error Resume Next
     Dim objCDOConf,objCDOSYS
     ' ** CREATE THE E-MAIL SERVER OBJECT **
     Set objCDOSYS = Server.CreateObject("CDO.Message")
     Set objCDOConf = Server.CreateObject ("CDO.Configuration")

     ' ** SET AND UPDATE FIELDS PROPERTIES **
     With objCDOConf
          ' ** OUT GOING SMTP SERVER **
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sMailServer
          ' ** SMTP PORT **
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
          ' ** CDO PORT **
          .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
          ' ** TIMEOUT **
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
          .Fields.Update
     End With

     ' ** UPDATE THE CDOSYS CONFIGURATION **
     Set objCDOSYS.Configuration = objCDOConf

     With objCDOSYS    
          ' ** WHO THE E-MAIL IS FROM **
          .From = strFrom

          ' ** WHO THE E-MAIL IS SENT TO **
          .To = strTo
                   
          ' ** THE SUBJECT OF THE E-MAIL **
          .Subject = strSubject
           
          ' ** SET THE E-MAIL BODY FORMAT (HTMLBody=HTML TextBody=Plain) **
          If blnHTML = True Then
          .HTMLBody = strMailBody
          Else
          .TextBody = strMailBody
          End If
           
          ' ** SEND THE E-MAIL **
          .Send
     End with                    
       
     ' ** CLOSE THE SERVER MAIL OBJECT **
     Set objCDOSYS = Nothing
End Sub
%>

<%
      CALL SendMailCDOSYS("nandh_79@yahoo.com","nandh_79@yahoo.com","test","test",False,"192.168.0.100")
%>
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 11057965
Is the SMTP server (192.168.0.100) connected to the internet?. Is the server running your code and the SMTP server on the same network?.. Otherwise i dont see no reason for the mail to fail.

Cheers!!
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11058010
The SMTP server is connected to the internet

i don't find any files badmails folder or in the queue folder

i think this means that the server has picked up the mails

is it right?
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 11058045
Yeah..That means the server has picked up the mails. Just try sending a new mail from yahoo to the same adress.. see if its not thier problem. Also, check to see if the mails are not in the 'bulk Mail' folder. Alternately, try using another email address (hotmail maybe??) and see if it works.

Cheers!!
0
 
LVL 21

Assisted Solution

by:ap_sajith
ap_sajith earned 210 total points
ID: 11058151
Just check these as well in the SMTP server.

In the Properties window for the SMTP server, Select the access tab. Locate the Relay Restriction button and click on it. Make sure that 'All Except the list below' option is selected.

Now click on the Security Tab. Make sure that the IUSR account (IUSR_ServerName) for the Server that is running your asp code is listed there.

If none of this works, try setting up SMTP server on the server running the asp code.

Cheers!!
0
 
LVL 1

Author Comment

by:Nandhini
ID: 11065482
sajith,

i will get back after testing
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 11179298
Hi,
Any Updates?. Do you need any further assistance with this?. Please close this question if no further assistance is needed.
If you need help closing this question, please refer to http://www.experts-exchange.com/help.jsp#hs5 on how to close a question.

Cheers!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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.
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…

762 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

26 Experts available now in Live!

Get 1:1 Help Now