Page 1 of 1

Email Layout

Posted: Sun Nov 04, 2018 5:18 pm
by G4MHJ
I have been looking (and learning) at the layout of the email template .mail and I am wondering if it is possible to add a line feed between each set of sensor strings in order to make it easier to read for a third party.

Re: Email Layout

Posted: Sun Nov 04, 2018 6:50 pm
by admin
Are you using a template file or is the content of the email directly specified on the subject/Body line in the event definition?

Re: Email Layout

Posted: Sun Nov 04, 2018 7:06 pm
by G4MHJ
admin wrote:
Sun Nov 04, 2018 6:50 pm
Are you using a template file or is the content of the email directly specified on the subject/Body line in the event definition?
I am using a renamed copy of the borgerjr.mail giving the image attached.

Re: Email Layout

Posted: Sun Nov 04, 2018 10:21 pm
by Mattk
Are you using the Borerji.mail exactly as is or have to modified it?

Borerjr.mail should give you "Meteobridge weather report" as a subject line (do not see this in your example) and the body of the mail should appear like

05/11/2018 06:12:00
Humidity: 89%
Temp: 17.9C
Raw Barom: 1005.60hPa
Solar: 55W/sqm
Wind Dir: 72
Wind Spd: 0mps
Wind Gust: 0mps
Tot Rain: 0.0mm

Line formatting/spacing can be done by editing the template (added 1 & 2 <CR>) to achieve something like the following and most email clients will respect this but some think they are smart and remove "extra lines" but do allow a toggle to respect the intended formatting

05/11/2018 06:17:00
Humidity: 90%

Temp: 18.1C


Raw Barom: 1005.50hPa
Solar: 97W/sqm
Wind Dir: 72
Wind Spd: 0mps
Wind Gust: 0mps
Tot Rain: 0.0mm

Re: Email Layout

Posted: Sun Nov 04, 2018 11:09 pm
by G4MHJ
I should have taken a copy first of borgervejr.mail before I tried to modify it. Is there a way of getting an original?
I noticed on the set-up dropdown I have a file _borgervejr.mail as well as borgervejr.mail but I am not sure what this is??

Here is my current file contents:
Erith Weather Report#\
[DD]/[MM]/[YYYY] [hh]:[mm]:00\r\n\
#if#{*[th0hum-act.0:-9999]!=-9999*}#then# Humidity: [th0hum-act.0:]%\r\n#else##fi#\
#if#{*[th0temp-act.0:-9999]!=-9999*}#then# Temp: [th0temp-act.1:]C\r\n#else##fi#\
#if#{*[thb0press-act.0:-9999]!=-9999*}#then# Baro: [thb0press-act.1:] hPa\r\n#else##fi#\
#if#{*[sol0rad-act.0:-9999]!=-9999*}#then# Solar: [sol0rad-act.0:]W/sqm\r\n#else##fi#\
#if#{*[uv0index-act.0:-9999]!=-9999*}#then# UV Index [uv0index-act.1:]\r\n#else##fi#\
#if#{*[wind0dir-act.0:-9999]!=-9999*}#then# Wind Dir: [wind0dir-act.0:]\r\n#else##fi#\
#if#{*[wind0avgwind-act.0:-9999]!=-9999*}#then# Wind Speed: [wind0avgwind-act.0:]mph\r\n#else##fi#\
#if#{*[wind0wind-max15.0:-9999]!=-9999*}#then# Wind Gust: [wind0wind-max15.0:]mph\r\n#else##fi#\
#if#{*[rain0total-sumday.0:-9999]!=-9999*}#then# Total Rain: [rain0total-sumday.1:]mm\r\n#else##fi#\

Giving an email with a Subject "Erith Weather Report"

04/11/2018 21:01:00 Humidity: 94% \ Temp: 9.2C Baro: 998.1 hPa Solar: 0W/sqm UV Index 0.0 Wind Dir: 146 Wind Speed: 0mph Wind Gust: 0mph Total Rain: 0.0mm

As you see the layout is not like your version.

Re: Email Layout

Posted: Mon Nov 05, 2018 12:05 am
by admin
Might depend on the editor you are using as those handle line ends differently.
Which one do you use? On which platform? Linux, Mac, Windows?

Can you please send the file to "info@samrtbedded.com" or give me remote access to your MB PRO?

Re: Email Layout

Posted: Sat Jan 05, 2019 8:32 pm
by hstorey219
Hi
I am new to pushing emails out, where can I obtain Borerjr.mail template ? Is there instructions on how to use it ?

Thanks
Harry

Re: Email Layout

Posted: Sat Jan 05, 2019 11:06 pm
by Mattk
That email template is installed by default in the \\your-mb-ip\data\templates and can be selected as template in a email service. Have you checked out the following services link re sending emails

https://www.meteobridge.com/wiki/index. ... h_Services