• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

cdonts newmail object return value

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
asmotritsky
Asked:
asmotritsky
1 Solution
 
jitgangulyCommented:
...
...
obj.send
On error resume next
if err.number <> 0 then
Response.Write "Error"
else
Response.Write "No error"
end if
0
 
thunderchickenCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now