Ewon Technical Forum

Full Version: Planner email content
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to send an email every morning with some tag values using planner.
So far I'm able to send the email at the time I require.
but, I'm having trouble with the content.
I would like to have something like this in the email body, not as an attachment.

Tank 1 level:    12345
Tank 2 level:    12345
Tank 3 level:    12345
Tank 4 level:    12345

I've tried the export block descriptor but have not fount the correct syntax.

any help would be greatly appreciated.

Mark M
In planner, email attachment if you write:

Code:
Livello kg (Capacita totale serbatoio 34200 kg, densita 450 kg/m3)
[$dtRL$tnLT15$ftT$st_s3$et_s0]
Pressione bar
[$dtRL$tnPT16$ftT$st_s3$et_s0]

You'll obtain an email body with something similar to:

Code:
Livello kg (Capacita totale serbatoio 34200 kg, densita 450 kg/m3)
"TimeInt";"TimeStr";"Value"
1664740802;"02/10/2022 20:00:02";13000

Pressione bar
"TimeInt";"TimeStr";"Value"
1664740802;"02/10/2022 20:00:02";12.29078

I'm pretty sure there's a way to send a more eye candy message but I never tried to do so because... customer never asked me!
Thanks for the reply. Close but not what I'm wanting
Ok, my customer needs an eye candy solution! Big Grin

In Basic IDE, in Init section add a line like:

Code:
ONDATE 1,"0 8 * * *","GOTO Morning_report"

Then in a dedicated section write something like:

Code:
Morning_report:
e$ = "youremail@address.it"
f$ = ""
o$ = "Morning report test"
n$ = CHR$(13) + CHR$(10)
s$ = "This is email subject" + n$ + "Tank 1 level: " + STR$ LEV_TANK1@ + " kg" + n$ + "Tank 2 level: " + STR$ LEV_TANK2@ + " kg" + n$ + "End of email"
sendmail e$, f$, o$, s$

And you'll obtain this:

Code:
This is email subject
Tank 1 level: 10967 kg
Tank 2 level: 8414 kg
End of email


PS: CHR$(13) + CHR$(10) means new line in email body