Solved

Sending Emails using CDONTS in Windows 2000 server IIS 5

Posted on 2002-07-17
18
252 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
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
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
 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

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 …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

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