?
Solved

cdonts newmail object return value

Posted on 2002-03-08
2
Medium Priority
?
250 Views
Last Modified: 2011-10-03
i'm using the cdonts newmail object to send email, does the send method have a return value?, if an error occurs with the send i want to get an indicator
0
Comment
Question by:asmotritsky
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Expert Comment

by:jitganguly
ID: 6851762
...
...
obj.send
On error resume next
if err.number <> 0 then
Response.Write "Error"
else
Response.Write "No error"
end if
0
 
LVL 11

Accepted Solution

by:
thunderchicken earned 200 total points
ID: 6851765
What kind of errors?

If it's an invalid email address you wont know until it's sent back to you.  You can always do this:

On Error Resume Next
set mymail = Server.CreateObject("CDONTS.NEWMAIL")
mymail.to = "whoever@wherever.com"
mymail.from = "foo@fooland.com"
mymail.subject = "blah"
mymail.body = "blah blah"
if err <> 0 then
  mymail.send
else
  response.write "ERROR!"
end if
set mymail = nothing

other than that, you wont know until after it's sent.  You can do FSO checks on the folders in C:\inetpub\mailroot

I belive those are QUEUE, BADMAIL and DROP or something like that.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

752 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