Solved

Sending Emails using CDONTS in Windows 2000 server IIS 5

Posted on 2002-07-17
18
250 Views
Last Modified: 2008-03-06
hi

I'm trying to send an email using CDONTS from my asp program running in IIS 5.0 with windows 2000 server.

i have written the code using CDONTS my program didn't throw any error but no mail is sent.

Can any one tell me how to send an email from IIS 5.0 in windows 2000 server.

The default virtual SMTP server is configured properly.

do give me suggestions or solutions

thanks in advance
0
Comment
Question by:ayeshanasreen
  • 4
  • 3
  • 3
  • +6
18 Comments
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 100 total points
ID: 7159657
One or two possibities:

Try CDO instead of CDONTS--it works a little better.

If you are running CDONTS the SMTP services must be running on the same server as the web pages. Did you take a look at the Bad Mail folder?

If you want to run the code on a remote SMTP service, take a look at the free and excellent ASPeMail available at www.persits.com.


Fritz the Blank
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 7159662
Did you check your badmail folder ? IS SMTP configuration OK ? Check this article.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q303734

I assume your code is ok. in FQDN tab supply your web server name
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 7160011
And make sure you use a valid "From" address in the script, otherwise the script will appear to run fine, but the BadMail folder will fill-up as Jit stated.
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 7160105
Hey! Hey!!!


Mark, is my bad mail folder completely invisible to everybody?

Don't mind what I say--I'll just sit here alone, in the dark, with no one paying me any mind at all....

;-)



0
 
LVL 18

Expert Comment

by:mgfranz
ID: 7160130
Oops.. sorry Fritz.  I only caught your excellent suggestion on using CDO instead.
0
 

Expert Comment

by:t0rque
ID: 7160169
i'd say avoid CDONTS altogether.  instead, as Fritz said, hit up www.aspemail.com and download their FREE component.  it allows you to specify a remote mail server, and you don't need to have SMTP installed locally (which is a hassle all in its own).  PLUS, it's more rubust.  it allows you to do all kinds of stuff to your emails in a much simpler method.

so, THAT'S how you send CDO mail... you don't ;)
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 7160195
If you can install components on your server great, but if you actually looked at the components, most of them are a kludge of SMTP anyway...

CDO is already there in most installs.
0
 
LVL 7

Expert Comment

by:daniel_c
ID: 7160376
Probably this is weird and funny, but I had same experience before where CDONTS can't send any e-mail.
The solution was beyond my "complex expectation", it was only reinstalling SMTP Service from Windows 2000 Control Panel - Add Remove Windows Component - IIS - SMTP.
Since then, I have experienced no more problem in sending e-mail using CDONTS.
Weird huh, but that's Windows... ^_^

Hope that helps,

-- DC
0
 
LVL 19

Expert Comment

by:webwoman
ID: 7160704
And sometimes, all you have to do is reboot the server...

We had a power outage a couple of weeks ago, mail stopped going out from 2 of my servers. Other server was fine. Reboot the 2 'bad' servers, they were fine again.

So if you can, you might want to try that... ;-)
0
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

 
LVL 3

Expert Comment

by:mastallama
ID: 7161329
ok, here's an asp script for you to try.  i think that part of your problem is you're using CDONTS...cuz...in IIS 5 you should use CDO.Message.

check this out...download this zip file then try it.  lemme know what happens!

there are 3 files in the zip file...
email.htm
email.asp
sent.htm

1. go to email.htm, fill out the form, hit submit.
2. it calls email.asp and sends the email.
3. email.asp redirects you to sent.htm.
4. check your email (the address you typed in at To:)

if you get the sent.htm page, then i'm 100% sure it sent and you will recieve it!  Problem solved...use CDO.Message.

**When the email sends, it also displays all the info you entered.  I set this all up in the body of the email.

;-)

~Jeremy~

http://www.jeremysouthard.org/email.zip

test it and see how it works on my site (win2k w/ IIS5)

http://www.jeremysouthard.org/email.htm
0
 
LVL 3

Expert Comment

by:mastallama
ID: 7161336
OOPS, SORRY!

this is untrue:

   **When the email sends, it also displays all the info you entered.  I set this all up in the body of the email.

Also, the email.htm file in the zip file looks differently than the one on my site, but it works exactly the same way, the text boxes are just resized differently.

 ~ MastaLlama ~
0
 
LVL 33

Expert Comment

by:hongjun
ID: 7510446
This question appears to have been abandoned. Please come back to this question and do the necessary evaluation or feedback. I will invite a Moderator to close this question if there's no reply from you after seven days.

I suggest
<PAQ with no refund>

** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **

hongjun
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 7512254
Me or a split on this one?

Fritz the Blank
0
 
LVL 3

Expert Comment

by:mastallama
ID: 7512283
fritz has the correct answer...i just provided an example.  to fritz or split, either is ok.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 7513381
I see answer been answered and thus recommended a PAQ. But it's ok to have points to fritz_the_blank.

hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 7513383
This question appears to have been abandoned. Please come back to this question and do the necessary evaluation or feedback. I will invite a Moderator to close this question if there's no reply from you after seven days.

I suggest
<points to fritz_the_blank>

** PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER **

hongjun
0
 

Expert Comment

by:modulo
ID: 7551374
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 7551403
Modulo,

Thank you for your work,

Fritz the Blank
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 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

13 Experts available now in Live!

Get 1:1 Help Now