"jp2code" <poojo.com/mailwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
"Anthony Jones" wrote:
Does the .Send method return anything from CDOSYS?
Ex:
Dim result
Set oMail = CreateObject("CDO.Message")
' other code
result = oMail.Send
No it doesn't return anything. Here is what the manual says:
http://msdn2.microsoft.com/en-gb/library/ms526482.aspx
Hi Mr. Jones,
Since the Send method does not return anything, is there another value I
can
examine to test for success?
If the submittal is successful, I want to direct them to a thank you page,
but not if the submittal failed.
If it fails it will raise an error.
You could use:-
On Error Resume Next
oMsg.Send
If Err.Number = 0 then
'Redirect to thank you page
Else
'Respond with error info possibly using Err.description
End If
--
Anthony Jones - MVP ASP/ASP.NET