Link to home
Start Free TrialLog in
Avatar of ayeshanasreen
ayeshanasreen

asked on

Sending Emails using CDONTS in Windows 2000 server IIS 5

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
ASKER CERTIFIED SOLUTION
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jitganguly
jitganguly

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

;-)



Oops.. sorry Fritz.  I only caught your excellent suggestion on using CDO instead.
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 ;)
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.
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
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... ;-)
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
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 ~
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
Me or a split on this one?

Fritz the Blank
fritz has the correct answer...i just provided an example.  to fritz or split, either is ok.
I see answer been answered and thus recommended a PAQ. But it's ok to have points to fritz_the_blank.

hongjun
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
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
Modulo,

Thank you for your work,

Fritz the Blank