Solved

cdonts newmail object return value

Posted on 2002-03-08
2
245 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
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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 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 video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

914 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

16 Experts available now in Live!

Get 1:1 Help Now