Enrico,
>I don't like it very much because I still don't know what the error is so I can't trap it.
You don't need to know what it is, just loop back from where the msgInfo() displaying the error message (the one after the send).
James
SEND EMAIL
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: SEND EMAIL
Enrico,
Here is a sample using a loop on error (not tested).
James
Here is a sample using a loop on error (not tested).
James
Code: Select all
local lError :=.f.
local nCounter:=0
local nTrys:=3
local nWait:= 5 // in seconds
...
do while lError .and. nCounter < nTrys
TRY
oEmailMsg := CREATEOBJECT ( "CDO.Message" )
WITH OBJECT oEmailMsg
...
:Send()
END WITH
SysRefresh()
CATCH oError
lError:=.t.
nCounter++
waitSeconds( nWait )
END
enddo
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: SEND EMAIL
Still I don't like it very much. I prefer to know what I deal with...James Bott wrote:Enrico,
>I don't like it very much because I still don't know what the error is so I can't trap it.
You don't need to know what it is, just loop back from where the msgInfo() displaying the error message (the one after the send).
James
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: SEND EMAIL
Thank you.James Bott wrote:Enrico,
Here is a sample using a loop on error (not tested).
EMG
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: SEND EMAIL
Enrico,
I just realized that you are probably going to need to set oError to nil in the CATCH oError routine--even if just for clarity.
James
I just realized that you are probably going to need to set oError to nil in the CATCH oError routine--even if just for clarity.
James
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: SEND EMAIL
Ok, thank you. I'm still waiting the client report after your SysRefresh() suggestion...
EMG
EMG