|
|
|
|
|
| | |
|
Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: error trapping |
From: |
Elija |
Date: |
8/30/2001 11:07:40 AM |
IP: |
194.6.9.129 |
1. Try something like...
...
some code
...
on error resume next
objmail.send
if err.number <> 0 then
...
your error code
...
end if
on error goto 0
2. Not completely sure what you are trying to achieve but...
You could put all the neccessary send mail code into a sub and then pass in the details...
' Send an email to a specified recipient
sub sendemailto(strto, strcc, strfrom, strsubject, strbody)
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = strfrom
objMail.Subject = strsubject
objMail.To = strto
objMail.cc = strcc
objMail.Body = strbody
on error resume next
objMail.Send
if err.number <> 0 then
call logMailError(err.number, err.description)
end if
on error goto 0
' Tidy up by destroying all objects created in this sub.
set objMail = nothing
end sub
Hope this helps
Elija |
Previous Message
|
|
|
|
|
|
|
|
|
|
|
|