Solved

cdonts newmail object return value

Posted on 2002-03-08
2
244 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
2 Comments
 
LVL 20

Expert Comment

by:jitganguly
Comment Utility
...
...
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 50 total points
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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 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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

12 Experts available now in Live!

Get 1:1 Help Now