Solved

Failed Email Delivery

Posted on 2001-09-12
14
627 Views
Last Modified: 2010-08-05
We send email from our ASP pages using CDONTS.  After executing myOBJ.send, is there anyway to detect if an email was not successfully delivered?  Is there some method or event of the CDONTS object that can be used to detect failed deliveries?

In Outlook, when an email is sent to an invalid email address, I receive a notification in my Inbox that the delivery failed.  Does CDONTS do this or can detect this notification?

From my understanding, CDONTS runs on top of SMTP.  Is there a SMTP command, event, method, etc. that is fired or can be fired when email deliveries fail?  If so, can the notification be detected in ASP?

We can not use Outlook and we want to do this from our ASP pages.  Is this possible?  What can I do?

Please help...
0
Comment
Question by:RoRo
  • 4
  • 3
  • 3
  • +3
14 Comments
 
LVL 18

Accepted Solution

by:
mgfranz earned 100 total points
ID: 6477909
Check the Badmail folder.

CDO does not have an object that can detect a failed message.
However, if you specify a valid From address in the message, you will get the failed message returned to that address.
0
 
LVL 2

Expert Comment

by:MCM
ID: 6478035
i don't think mgfranz if correct. from the properties panel of the SMTP icon in the IIS management console, under the "Messages" tab, the is a space for "Send copy of non-delivery report to:", right above the entry for the place to deposit undelivered messages.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6478051
I'm not sure if CDO uses this portion of SMTP though...

I have not tested it, but if it words can you let me know.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 2

Expert Comment

by:MCM
ID: 6478081
mgfranz -- i think roro is talking about CDONTS, not CDO; i didn't notice the confusion earlier. you're right about CDO, if you specify a return address it will come back to you if it fails. CDONTS runs the SMTP server and will use the badmail address.
0
 
LVL 11

Expert Comment

by:thunderchicken
ID: 6478420
I agree with mgfranz, my bet is on the BADMAIL folder.  This is where all my CDONTS error mail has gone (at least that was not sent out)
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6479780
Since I don't have access to the BadMail folder at my current clients ISP Host server, so I have no idea where the bad messages are going, but since the script relies on the user to insert their address, I can only assume it is correct.  With my latest project I use CDO and the From: address is parsed as the recipients address so I really have no idea if it would use the BadMail folder...

I guess some testing is in order...
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6480084
The badmail folder definitely holds any undeliverable mail. Also, you can set it so that any undeliverable mail generates a response to whoever is set as the mail contact.

I'm pretty sure it works for CDONTS. I know the badmail folder does -- it holds all the undeliverable mail that was attempted through CDONTS. I've used that to debug why my forms weren't being sent.
0
 

Author Comment

by:RoRo
ID: 6480627
I believe the BADMAIL idea will work for storing the email.  Then, someone has to check the BADMAIL folder to resend the email.  Is there a way to programmatically detect this failed delivery notification in ASP.  Once detected, the recipient's record could be flagged. Then, a utility can be executed at a later time to look for the "flagged" records and resend them then.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6480639
Well, the FSO can be used to detect if a file exists in a folder, but the name of the file will have to be parsed first, saved to a .txt file, then dissasembled line by line to parse an address out of the file.

Then the address can be flagged.  Quite a bit of work though...
0
 
LVL 2

Assisted Solution

by:MCM
MCM earned 100 total points
ID: 6480648
roro, did you check out the CDONTS settings i mentioned? there is some confusion on this thread between CDO and CDONTS; it you are using CDONTS as you claim then you can set the non-delivery report address as I originally described. CDO is a different product that uses MAPI sessions, usually by interacting with a product like Outlook.
0
 

Author Comment

by:RoRo
ID: 6480704
I believe the BADMAIL idea will work for storing the email.  Then, someone has to check the BADMAIL folder to resend the email.  Is there a way to programmatically detect this failed delivery notification in ASP.  Once detected, the recipient's record could be flagged. Then, a utility can be executed at a later time to look for the "flagged" records and resend them then.
0
 

Author Comment

by:RoRo
ID: 6480762
We are using CDONTS.  MCM, which CDONTS setting are you referring to?  Or, are you referring to setting a property in the IIS management console?
0
 
LVL 7

Expert Comment

by:lavinder
ID: 8780169
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split - mgfranz mcm
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
lavinder
EE Cleanup Volunteer
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 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