Send Method (CDONTS NewMail Object)

G

George Viveiros

Is there a way to determin if the email message was sent? I have a
numnber of applications that use CDONTS to send mail from both ASP and
ASPX pages. If the server is down mail does not get sent. I do not see a
way to determine this by code. Does anyone know of a way?
 
A

Aaron Bertrand - MVP

Use CDO.Message and a *RELIABLE* SMTP server.

If you really want to stick with deprecated functionality like CDONTS, you
can check the pickup, queue and badmail folders using FileSystemObject.

A
 
G

George Viveiros

1. What other options are there besides CDONTS?

2. Where would one find some code examples to check the pickup, queue
and badmail folders?
 
G

George Viveiros

Didn`t catch: Use CDO.Message and a *RELIABLE* SMTP server, at first.
What do you consider a *RELIABLE* SMTP server?
 
A

Aaron Bertrand - MVP

What do you consider a *RELIABLE* SMTP server?

One where you don't have to worry about what happens when, as you stated,
"the server is down."

A reliable SMTP server is just up, and stays up.
 
A

Aaron Bertrand - MVP

1. What other options are there besides CDONTS?

Like I said, CDO.Message (see http://www.aspfaq.com/2026), or there are
plenty of 3rd party options, e.g. http://www.aspfaq.com/2119
2. Where would one find some code examples to check the pickup, queue
and badmail folders?

You would use FileSystemObject. Here is a quick sample (I have no idea what
the path to *your* badmail folder would be):

set fso = CreateObject("Scripting.FileSystemObject")
set fold = fso.getFolder("c:\...path...\badmail\")
for each fil in fold.files
response.write fil.name & "<br>"
next
set fold = nothing
set fso = nothing

Also see http://www.aspfaq.com/2039
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top