Is there a way I can verify an email has sent?

I have an ontime running at midnight that send a nightly log email, Is there a way I can check to verify what the last email was sent? some sites have intermittent 3g connectivity and we need to make sure specific alarms and such get sent.

hello @lucas99456,

You can check if an email is sent by using the action ID of the email. Unfortunately this also means you will need to send the email using the basic IDE to be able to retrieve the ID and check the status. Here is an example of the send mail option. You can use ONALARM to trigger the email or ONCHAGE if you prefer. You can find more info about these two functions in the user guide. https://developer.ewon.biz/system/files_force/rg-0006-01-en-basic-programming.pdf?download=1

SendSMS:
  ONSTATUS "goto ProcessStatus"
  SENDSMS "12346,gsm,0","test message"

  REM: GET THE ACTION ID
  a% = GETSYS PRG,"ACTIONID"

END

ProcessStatus:
  b% = GETSYS PRG,"EVTINFO"`

Regards,
Deryck

Hey @deryck_hms,

Thanks for the response. I have a pretty good handle on the script for the ewon, the past couple months I have been working with my client to create a SCADA network for a bunch of different systems. The emails are setup to send at 0:0:0 and the function also has two string tags that allow my end user to change who these emails can go to, so there will not always be just one email being sent out nightly, it could be two.

I will look into the getsys prg, “evtinfo” and see, that gives me the direction I needed.

If you call and store the action ID after each email you should be able to check every email.

Regards,
Deryck

1 Like

Hi Jaap,

It seems like the device is sending out emails without any issues, are you not receiving them?

?Hi Tim, I main a sample for the problem from Lucas on top, i only send this for him how he can control if an email was sent, on my side this is working perfect, thanks for your feedback.

1 Like

Whoops,

I just saw the most recent posts and didn’t look too far back

Thanks @jswenker, that helps put what I was trying to accomplish into a better perspective. I have yet to actually try this in my script, I had to figure out some other bugs first. This will be my next task.

Topic closed due to inactivity.