Email Layout

This section covers the Meteobridge PRO units exclusively

Moderator: Mattk

Post Reply
G4MHJ
Junior Boarder
Junior Boarder
Posts: 30
Joined: Fri Aug 24, 2018 9:40 pm

Email Layout

Post by G4MHJ » Sun Nov 04, 2018 5:18 pm

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.
Image

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5410
Joined: Mon Oct 01, 2007 10:51 pm

Re: Email Layout

Post by admin » 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?

G4MHJ
Junior Boarder
Junior Boarder
Posts: 30
Joined: Fri Aug 24, 2018 9:40 pm

Re: Email Layout

Post by G4MHJ » Sun Nov 04, 2018 7:06 pm

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.
Attachments
Screenshot 2018-11-04 at 16.58.46.png
Screenshot 2018-11-04 at 16.58.46.png (70.02 KiB) Viewed 96 times
Image

Mattk
Platinum Boarder
Platinum Boarder
Posts: 521
Joined: Mon Sep 22, 2014 3:24 am

Re: Email Layout

Post by Mattk » Sun Nov 04, 2018 10:21 pm

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

G4MHJ
Junior Boarder
Junior Boarder
Posts: 30
Joined: Fri Aug 24, 2018 9:40 pm

Re: Email Layout

Post by G4MHJ » Sun Nov 04, 2018 11:09 pm

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.
Image

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5410
Joined: Mon Oct 01, 2007 10:51 pm

Re: Email Layout

Post by admin » Mon Nov 05, 2018 12:05 am

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?

Post Reply