You all know that when you want to send or receive the notification from / to SM, we have to integrate with email application. One of them is SCEmail which is built-in mail of SM (Java Mail). So in this post, we will talk about the working flow of SCEmail to send the emails from SM. Here it is:
When scemail starts, it reads the value in the scemail.chk file and does a query for all email eventout records with an evsysseq (checkpoint) greater than the value in the scemail.chk file.
The query issued by scemail to the eventout file is roughly as follows:
SELECT … from eventoutm1 WHERE evtype=”email” and evsysseq>(the checkpoint number)
It sends all the emails that were selected (updating the scemail.chk file after each email) and then sleeps for 10 seconds (or whatever sleep value you have setup).
When scemail wakes up it does the same thing, except it uses the checkpoint value in memory rather than reading the scemail.chk file again.