Trapping CDONTS.NewMail Errors

Results 1 to 2 of 2

Thread: Trapping CDONTS.NewMail Errors

  1. #1
    Aalaap Guest

    Default Trapping CDONTS.NewMail Errors

    &nbsp;<BR>I&#039m using CDONTS.NewMail to send mail from my server. So far I haven&#039t had any problems - but in case my server encounters an error, is there any way I can trap it ? Does the Send method return any value I can use to determine if the process was completed successfully ?<BR><BR>Thank you.<BR>- Aalaap<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Trapping CDONTS.NewMail Errors

    Before you instantiate the mail object put &#039on error resume next&#039. Then prepare your mail, send your mail and trap any errors through the errors object, i.e. if err<>0 then....It&#039s probably useful to capture this in a table or a text file so that you can check that mails have been sent and if not then what was the cause of the problem.There may obviously be other ways but this way has served me well enough so far.
    Last edited by Jay; 04-16-2011 at 01:42 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts