473,322 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Test CDO Message Send Response

Does the .Send method return anything from CDOSYS?

Ex:
Dim result
Set oMail = CreateObject("CDO.Message")
' other code
result = oMail.Send

I've tried searching, but I can't find where anyone says what "Send"
returns. An integer, a boolean, a string, or void?
Sep 14 '07 #1
3 12351

"jp2code" <poojo.com/mailwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Does the .Send method return anything from CDOSYS?

Ex:
Dim result
Set oMail = CreateObject("CDO.Message")
' other code
result = oMail.Send

I've tried searching, but I can't find where anyone says what "Send"
returns. An integer, a boolean, a string, or void?

No it doesn't return anything. Here is what the manual says?

http://msdn2.microsoft.com/en-gb/library/ms526482.aspx
--
Anthony Jones - MVP ASP/ASP.NET
Sep 14 '07 #2
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.

"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
--
Anthony Jones - MVP ASP/ASP.NET


Sep 14 '07 #3
"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
Sep 14 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: George Hester | last post by:
I have always used this in ASP to test if the client is accepting cookies: <%@language="VBScript"%> <% Session ("nc") = 1 If Len(Session("nc")) = 0 Then 'Cookies Off Else 'Cookies On End If
0
by: cpavon | last post by:
Hello everyone, I am fairly new to MACT, I am currently trying to parse the oResponse.Body to retrive a dynamic values...store in an array and then randomly post those values. Does anyone...
2
by: Janna Deegan | last post by:
Hello all, First off, if there is a better place to post for an answer to this question, please feel free to point me there. I have some very strange behavior happening with my System.web.mail...
3
by: pmud | last post by:
Hi, I have ab ASP.Net Application in which I need to send e-mail on button click. Even though my C# code for that is correct.I am getting the following error:: I think the following error can be...
3
by: jab3 | last post by:
Hello. I"m new to this group, and to JavaScript in general, so please forgive me if I breach local etiquette. I'm trying to implement some client-side 'dynamic' validation on a form. I'm having...
16
by: whyyyy | last post by:
The script below works fine if the form is filled out and submitted. But a (blank) e-mail is sent whenever the page loads, even when the form is not submitted. I would like to receive the e-mail...
7
by: PW | last post by:
Hi, I'm an amateur ASP programmer using ASP, VBScript, IIS and IE. On one of my websites (www.usaus.org) I have started getting lots of adverts on my message board. Things like free...
2
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
I was wonder if there is any protocol or suggestions on how to setup unit testing projects in large solution??? If you have a large solution of say 50 projects and add a project for every unit...
4
by: gurufordy | last post by:
Hello. Trying to use the ASP.net user functionality but it keeps failing on me. I have created a login and registration page for my site. When you fill in the registration form it should send a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.