Does anyone know a way to get the result from the .SEND method of a
CDO.Message object? i.e.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set objEmail = CreateObject("CDO.Message")
' assume email is configured appropriately
objEmail.Send
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When I run
result = objEmail.Send
result is blank or = "" when it is successful.

I am trying to determine that the MSX server did accept my SMTP traffic.

Thanks,
Bart

Re: CDO.Message Object by Michael

Michael
Wed Mar 28 21:19:00 CDT 2007

Bart Perrier wrote:
> Does anyone know a way to get the result from the .SEND method of a
> CDO.Message object? i.e.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Set objEmail = CreateObject("CDO.Message")
> ' assume email is configured appropriately
> objEmail.Send
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> When I run
> result = objEmail.Send
> result is blank or = "" when it is successful.
>
> I am trying to determine that the MSX server did accept my SMTP
> traffic.
> Thanks,
> Bart


AFAIK, the Send method reports failure only by throwing (trappable) runtime
COM errors...


--
Michael Harris
Microsoft.MVP.Scripting



Re: CDO.Message Object by Bart

Bart
Fri Mar 30 09:33:26 CDT 2007


"Michael Harris (MVP)" <mikhar.at.mvps.dot.org> wrote in message
news:%23oQHsiacHHA.2068@TK2MSFTNGP06.phx.gbl...
> Bart Perrier wrote:
>> Does anyone know a way to get the result from the .SEND method of a
>> CDO.Message object? i.e.
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Set objEmail = CreateObject("CDO.Message")
>> ' assume email is configured appropriately
>> objEmail.Send
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> When I run
>> result = objEmail.Send
>> result is blank or = "" when it is successful.
>>
>> I am trying to determine that the MSX server did accept my SMTP
>> traffic.
>> Thanks,
>> Bart
>
>
> AFAIK, the Send method reports failure only by throwing (trappable)
> runtime COM errors...
>
>
> --
> Michael Harris
> Microsoft.MVP.Scripting
>
>

Thanks for the reply, Michael.

I did give the script a bogus DNS name and generated a specific COM error.
Only certian machines are allowed to send mail through the server so I can
send mail from a machine that is not allowed to send through this SMTP
server to generate the error.

Again, thanks for the reply.

Bart.