Five Stars

Sending an error number by email

Hi

 

I try to use tlogcatcher to catch an error and to send it by mail.

my problem is that its send multiple emails by the number of errors.

is there any solution for this .

 

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
Twelve Stars TRF
Twelve Stars

Re: Sending an error number by email

Replace tSend mail by tFileOutputDelimited or tHashOutput to memorize the informations you want to send. Then add a tPostJob subjob which will automatically starts when the job finishes and use tSendMail from this subjob.
This will work for errors and warnings, but for exceptions, probably you need to send email immediatly when the event is catched.

TRF
Twelve Stars TRF
Twelve Stars

Re: Sending an error number by email

Probably if an exception is catched by tLogCatcher, you will decide to stop the process, not only to memorize the event for later use.

TRF
13 REPLIES
Twelve Stars TRF
Twelve Stars

Re: Sending an error number by email

Hi,
Depends of your job design.
Please, share it and also precise what you expect: 1 email for the job or 1 email per error.

TRF
Ten Stars

Re: Sending an error number by email

For send global email about Job execution - use onSubJobOk connection

Screen Shot 2017-05-29 at 1.23.34 AM.png

 

for send information about all errors but in single email - change tLogRow to tFileOutputDelimited and use this file as attachment

-----------
Five Stars

Re: Sending an error number by email

Hi

 

1 email per job with all the errors that logcatcher will catch.

 

my job design look like:

 

tlogcatcher----> tjavarow--->tlogrow

      |

onsubjobok

      |

tsendmail

 

Five Stars

Re: Sending an error number by email

Is there another way beside file attatchment?

Ten Stars

Re: Sending an error number by email

What is the problem?

 

as @TRF already wrote - all depend from what You try to achieve?

 

 

-----------
Twelve Stars TRF
Twelve Stars

Re: Sending an error number by email

Replace tSend mail by tFileOutputDelimited or tHashOutput to memorize the informations you want to send. Then add a tPostJob subjob which will automatically starts when the job finishes and use tSendMail from this subjob.
This will work for errors and warnings, but for exceptions, probably you need to send email immediatly when the event is catched.

TRF
Twelve Stars TRF
Twelve Stars

Re: Sending an error number by email

Regarding the content, if you don't want to attach files, you can construct friendly content using HTML tags.

TRF
Five Stars

Re: Sending an error number by email

Hi

 

Thank for your answer . can you explain the last line?

Twelve Stars TRF
Twelve Stars

Re: Sending an error number by email

Regarding the html content?
In the tPostJob subjob, use one or more global variables to prepare the content with html tags inside (for example to build list, change color and so on). Then in tSendMail, tick the option "HTML" and complete the content using the variables and what you want.
If you need a more detailed answer, share your use case with data sample and expected result.

TRF
Five Stars

Re: Sending an error number by email

Hi

you said "This will work for errors and warnings, but for exceptions, probably you need to send email immediatly when the event is catched"

what do you mean?

 

Thank you

Twelve Stars TRF
Twelve Stars

Re: Sending an error number by email

Probably if an exception is catched by tLogCatcher, you will decide to stop the process, not only to memorize the event for later use.

TRF
Twelve Stars TRF
Twelve Stars

Re: Sending an error number by email

@Boof1977, did you succeed to do what you wanted?


TRF
Five Stars

Re: Sending an error number by email

Yes.

 

Thank you