does CDOSYS using requires SMTP windows 2003 role

Hi experts

Am wondering if using CDOSYS component requires installaing SMTP windows 2003 role.

Please advise with a complete technical explanation.

Why am asking this, because i have multiple servers running under windows 2003 and running also a unique asp application that uses CDOSYS for sendiung emails.

My smtp server is on a remote server.

I have problems on servers where SMTP role is not installed and mails are not getting out while on other server also not running SMTP role, mails are going out correctly

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
See "Sending a text e-mail using a remote server:" on this page:
humer2000Author Commented:
i know these requirements dude nut it does not answer my question, i need to know SMTP win 2003 role uses exclusevely cdonts.dll and not cdosys.dll
What is strange is that when i add SMTP role, even if the application is set to send with cdosys, cdonts is used and mails are going out only for local deliveries, am getting crazy
Dave BaldwinFixer of ProblemsCommented:
Your original question didn't say anything about 'cdonts'.  Which is really confusing since this article says that CDONTS isn't installed on Windows 2003.  There are a lot of Google results about installing it afterwards.
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

humer2000Author Commented:
Yes indeed, cdonts is not part of the package, but when install SMTP role in windows 2003, what this rol does use exactly ? what's the purpose of installing it if Cdosys connects to remote server. I just want to understand how it works
Dave BaldwinFixer of ProblemsCommented:
That I can't answer.  Please click on "Request Attention" to see if someone else can answer your question.
You just answered your own question.

If you are using cdosys which is form windows 2003 or later, then you need cdosys.dll as cdonts is not available for windows server 2003 or higher.

smtp server comes with your windows installation, although, Iam not sure if it is installed by default.

To relay your email messages using cdosys, you will need to have email exchange server supplied by your email server administrator.

You will also need this line at top of your page.

<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows XP Library" -->

Open in new window

Never mind that it said XP. It works for server too.

What exactly is the issue you are having?

humer2000Author Commented:
the issue am having is that i have a same application installed on win 2003 servers using CDOSYS to send emails
On some servers where SMTP role not installed, mails are sent correctly
On Others, mails are not sent, but when i install SMTP role, mails send correctly
which is very contradictory
You are confusing smtp server installed with IIS with cdonts.

Those are 2 different issues altogether.

You will need default smtp server installed to relay your email messages and as stated in my previous response, assuming your company uses outlook exchange server, then you will an exchange credentials as your smtp server.

In our company, we use something like as our smtp server and you must have this on your cdosys or your email will not go out regardless of whether smtp server is installed in iis or not.

So, you have this cdonts which requires cdonts.dll

Dim objMail
Set objMail = CreateObject("CDONTS.NewMail")
ObjMail.Send "", "", "Subject", "This is the body."
Set objMail = Nothing

Open in new window

and you have cdosys which requires cdosys.dll or the one line code I posted previously.

Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.TextBody="This is a message."
set myMail=nothing

Open in new window

Both are completely different from the default smtp server you see on iis which helps you relay email messages.

Which you can also configure to send any emails that could not be sent into Badmail folder in mailroot next to wwwroot folder.

Hope this has shed some light into your questions.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
humer2000Author Commented:
Hi again sammySeltzer

Please note that CDONTS is not installed on the win 2003 servers
Am using the default CDOSYS by default.
But as i said, some servers does not send email correctly without installing the SMTP role
Once the smtp role is installed, i am configuring it as a smarthost (so that it drop mails to my real smtp server), and then mails goes out correctly.
What i want to understand is that other servers not having SMTP installed are send mails ok.

Am about to consider that my win 2003 installation is corrupt and need to be reinstalled. The other way is to find out how to uninstall CDOSYS and re install it. may be this will resolve my issue
Dave BaldwinFixer of ProblemsCommented:
As I tried to point out above, CDOSYS can be used to send to a remote SMTP server so you don't need the local SMTP server.  It requires a slightly different coding than the local version but you can see it in the link I posted in my first response above.  I've used it for both local and remote SMTP servers (with the appropriate changes) and it works fine.
humer2000Author Commented:
i understand perfectly what you have stated but unfortunately it does answer my question.
As i told you, samme app on same win 2003 servers (17) only 3 sservers does not send the mail correctly unless SMTP role is installed. I will try to format one of them and completely reinstall it and i ll give it a try.
Thanks a lot for your time
humer2000Author Commented:
sorry, i wanted to say "it does not answer my question"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.