Hi All, I am writing an ASP page for sending mails using CDONTS component. Is there any way to capture errors if the components fails to send mails? I would appreciate any helps in this regard. Thanks in advance! Best Regards, Inderpal Singh
hi Inderpal, CDONTS is fairly obsolete nowadays, and most sites have switched to CDO or the system.mail facility in the .Net libraries. Either of these will probably be a better bet. It should be easy to trap if a mail is not sent, but rather harder to trap if it doesn't arrive. regards FBJ
Hi, Thanks for replying and yeah, I know CDONTS is obsolete but my client wants in that component only. Could you provide me some way to track if there is any error while sending mails like CDONTS is component is not installed and other errors? Best Regards, Inderpal Singh
sure you can. just capture the error and response.write it to the browser, i.e. strErr = "" On Error Resume Next ' catch errors If Err <> 0 Then ' error occurred strErr = Err.Description response.write "Error: "&strErr&"<br/>"&vbcrlf End If Code (markup): keep asking questions and i might just break 500 posts today! lol let's have a party! VG