Author Topic: Weather alert email shows HTML code  (Read 1562 times)

0 Members and 1 Guest are viewing this topic.

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Weather alert email shows HTML code
« on: June 18, 2017, 10:58:45 AM »
HI folks

Not sure whats going on, i had a weather alert email saying temp reached 30ºC
as i set it up, problem is, its coming through showing the HTML code.

The normal weather email I've setup shows properly

Here is the customemailwarning.txt

Code: [Select]
<body bgcolor="#EAEAEA">

<table border="0" width="100%" background="http://www.brecklandweather.com/images/bgcloud.png">
<tr>
<td>
<p align="center"><a href="http://www.brecklandweather.com/">

<img src="http://www.brecklandweather.com/images/logo3.png" height="104" width="764" border="0"></a></td>
</tr>
</table>
<br><br>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><b><font color="#FF0000" size="4">
<a href="http://www.brecklandweather.com/">Suffolk Weather's Weather
Alert Email</a></font></b></p>
<p><font face="Calibri">Good %timeofdaygreeting%, you are receiving this email because
you have subscribed to it through
<a title="http://www.brecklandweather.com" href="http://www.brecklandweather.com">Suffolk
Weather</a> This is our&nbsp; automatically generated email that provides
the alerts that are triggered by the weather station and the&nbsp; current
conditions at the time. If there is any data that you would like to see that is not in
this email or if you wish to unsubscribe then please <b>
<a href="mailto:admin@brecklandweather.com?subject=Suffolk Weather email report
enquiry">
contact me</a></b> and i will get back to you as soon as possible.</font></td>
</tr>
</table>

<br />
<table border="0" width="100%">
<tr>
<td bgcolor="#FFFF99">
<p align="center"><b><font face="Calibri" color="#FF0000" size="4">Current Alarm
%warningemailalarm%</font></b></td>
</tr>
<tr>
<td><b><font face="Calibri" size="4" color="#0066FF">
<br>Current Conditions:</font></b><p><b>
<font face="Calibri" color="#336600">%weatherdescription%</font></b></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Temp:</font></td>
<td><b><font face="Calibri">%temp%ºC</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Feels Like:</font></td>
<td><b><font face="Calibri">%feelslike%ºC</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Temp Change in last
hour:</font></td>
<td><b><font face="Calibri">%tempchangelasthour%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Pressure:</font></td>
<td><b><font face="Calibri">%baro% Steady @ %trend%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Humidity:</font></td>
<td><b><font face="Calibri">%humpercent%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Humidity Change last
hour:</font></td>
<td><b><font face="Calibri">%humchangelasthour%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Dew Point: </font> </td>
<td><b><font face="Calibri">%dew%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Dew Point
Depression:</font></td>
<td><b><font face="Calibri">%dewdep%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Wind (average last
10 min): </font> </td>
<td><b><font face="Calibri">%avgspd% from the %winddirinwords%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Gust since
midnight:</font></td>
<td><b><font face="Calibri">%maxgst% from the&nbsp;%maxavgdirectionletter% @
%maxgstt%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Rain since midnight</font></td>
<td><b>%dayrnmidnight%</b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Rain rate now (if
any)</font></td>
<td><b><font face="Calibri">%currentrainratemm%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Maximum rain rate
today</font></td>
<td><b><font face="Calibri">%maxrainrate%</font></b></td>
</tr>
</table>
<br>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><font face="Calibri">Automatically generated &amp; sent by
<a href="http://www.brecklandweather.com/"><b>Suffolk</b></a><b><a
href="http://www.brecklandweather.com/"> Weather</a></b>
using the<br><a href="http://www.weather-display.com">Weather Display</a> software,
version <b>%wdbuild%</b> build
<b>70</b> </font>
</td>
</tr>
</table>
</body>


and here is the  customweatherreport.txt

Code: [Select]
<body bgcolor="#EAEAEA">

<table border="0" width="100%" background="http://www.brecklandweather.com/images/bgcloud.png">
<tr>
<td>
<p align="center"><a href="http://www.brecklandweather.com/">

<img src="http://www.brecklandweather.com/images/logo3.png" height="104" width="764" border="0"></a></td>
</tr>
</table>
<br><br>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><b><font color="#FF0000" size="4">
<a href="http://www.brecklandweather.com/">Breckland Weather's daily
email</a></font></b></p>
<p><font face="Calibri">Good %timeofdaygreeting%, you are receiving this email because
you have subscribed to it through
<a title="http://www.brecklandweather.com" href="http://www.brecklandweather.com">Suffolk
Weather</a> This is our&nbsp; automatically generated email that provides current
conditions, minimum's, maximum's and averages of the day, month and
year. If there is any data that you would like to see that is not in
this email or if you wish to unsubscribe then please <b>
<a href="mailto:admin@brecklandweather.com?subject=Suffolk Weather email report
enquiry">
contact me</a></b> and i will get back to you as soon as possible.</font></td>
</tr>
</table>
<br />
<table border="0" width="100%">
<tr>
<td>
<p align="center"><b><font face="Calibri" size="4" color="#0066FF">
Station Forecast</font></b></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td>
<strong>The outlook will be %vpforecasttext%</strong></td>
</tr>
</table>
<br />
<table border="0" width="100%">
<tr>
<td>
<p align="center"><b><font face="Calibri" size="4" color="#0066FF">
Current Conditions</font></b></td>
</tr>
<tr>
<td><b><font face="Calibri" color="#336600">It's %Currentsolardescription% with a
%bftspeedtext10% from the %winddirinwords%, the temperature is %temp%C, its been %temptrendnamehour% for
the past hour and its feeling quite %heatcolourword%, the outlook is %zambretti%</font><font
face="Calibri"><br><font color="#FF0000">Alert Alarm (if any)  %current alarm flashing%</font>
</font></b></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Temp:</font></td>
<td><b><font face="Calibri">%temp%ºC</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Feels Like:</font></td>
<td><b><font face="Calibri">%feelslike%ºC</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Temp Change in last
hour:</font></td>
<td><b><font face="Calibri">%tempchangelasthour%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Pressure:</font></td>
<td><b><font face="Calibri">%baro% Steady @ %trend%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Humidity:</font></td>
<td><b><font face="Calibri">%humpercent%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Humidity Change last
hour:</font></td>
<td><b><font face="Calibri">%humchangelasthour%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Dew Point: </font> </td>
<td><b><font face="Calibri">%dew%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Dew Point
Depression:</font></td>
<td><b><font face="Calibri">%dewdep%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Wind (average last
10 min): </font> </td>
<td><b><font face="Calibri">%avgspd% from the %winddirinwords%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Gust since
midnight:</font></td>
<td><b><font face="Calibri">%maxgst% from the&nbsp;%maxavgdirectionletter% @
%maxgstt%</font></b></td>
</tr>
<tr>
<td width="231">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><b><font face="Calibri" size="4" color="#0066FF">Min -
Max - Averages</font></b></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Max Temp since
midnight:</font></td>
<td><b><font face="Calibri">%maxtempnodp% @ %maxtempt%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Min Temp since
midnight:</font></td>
<td><b><font face="Calibri">%mintemp% @ %mintempt%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Max Temp past 24hrs:</font></td>
<td><b><font face="Calibri">%maxtemplast24hours% @
%maxtemplast24hourst%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Min Temp past 24hrs:</font></td>
<td><b><font face="Calibri">%mintemplast24hours% @
%mintemplast24hourst%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Max Humidity so far:</font></td>
<td><b><font face="Calibri">%highhum% @ %highhumt%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Min Humidity so far:</font></td>
<td><b><font face="Calibri">%lowhum% @ %lowhumt%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Average Temp Since
6am:</font></td>
<td><b><font face="Calibri">%avtempsince6am%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Average Temp Since
6pm:</font></td>
<td><b><font face="Calibri">%avtempsince6pm%</font></b></td>
</tr>
<tr>
<td width="232">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><b><font face="Calibri" size="4" color="#0066FF">
Rainfall</font></b></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Rain since midnight:</font></td>
<td><b><font face="Calibri">%dayrnmidnight% </font></b> </td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Current rainrate:</font></td>
<td><b><font face="Calibri">%currentrainratehr%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Max rainrate today:</font></td>
<td><b><font face="Calibri">%maxrainrateyesthr% @ %maxrainratetime%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Rain past 24hrs</font></td>
<td><b><font face="Calibri">%totalrainlast24hours%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Rain this month:</font></td>
<td><b><font face="Calibri">%monthraininmm%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Rain this year:</font></td>
<td><b><font face="Calibri">%yearlyraininmm%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Days with no rain:</font></td>
<td><b><font face="Calibri">%dayswithnorain%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Days with rain this
month:</font></td>
<td><b><font face="Calibri">%dayswithrain%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Days with rain this year:
</font> </td>
<td><b><font face="Calibri">%dayswithrainyear%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Last recorded rain:</font></td>
<td><b><font face="Calibri">%timeoflastrain%
%dateoflastrain%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">Evaportranspiration this
month:</font></td>
<td><b><font face="Calibri">%VPetmonth%</font></b></td>
</tr>
<tr>
<td width="232"><font face="Calibri" color="#0033CC">(evaporated moisture from the
soil)</font></td>
<td>&nbsp;</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><b><font face="Calibri" size="4"
color="#0066FF">Solar/Sunshine</font></b></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="227"><font face="Calibri" color="#0033CC">Current Solar (W/M2)</font></td>
<td><b><font face="Calibri">%VPsolar% - Max possible %maxsolarfortime%</font></b></td>
</tr>
<tr>
<td width="227"><font face="Calibri" color="#0033CC">High solar today:</font></td>
<td><b><font face="Calibri">%highsolar% @ %highsolartime%</font></b></td>
</tr>
<tr>
<td width="227"><font face="Calibri" color="#0033CC">Solar kwh today</font></td>
<td><b><font face="Calibri">%todaysolarhrs%</font></b></td>
</tr>
<tr>
<td width="227"><font face="Calibri" color="#0033CC">Hours of sunshine
today:</font></td>
<td><b><font face="Calibri">%sunshinehourstodateday%</font></b></td>
</tr>
<tr>
<td width="227"><font face="Calibri" color="#0033CC">Hours of sunshine this
month:</font></td>
<td><b><font face="Calibri">%sunshinehourstodateday%hrs</font></b></td>
</tr>
</table>
<br>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><font face="Calibri">Automatically generated &amp; sent by
<a href="http://www.brecklandweather.com/"><b>Suffolk</b></a><b><a
href="http://www.brecklandweather.com/"> Weather</a></b>
using the<br><a href="http://www.weather-display.com">Weather Display</a> software,
version <b>%wdbuild%</b> build
<b>70</b> </font>
</td>
</tr>
</table>
</body>

 

and now the parsed file code

Code: [Select]
<body bgcolor="#EAEAEA">

<table border="0" width="100%" background="http://www.brecklandweather.com/images/bgcloud.png">
<tr>
<td>
<p align="center"><a href="http://www.brecklandweather.com/">

<img src="http://www.brecklandweather.com/images/logo3.png" height="104" width="764" border="0"></a></td>
</tr>
</table>
<br><br>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><b><font color="#FF0000" size="4">
<a href="http://www.brecklandweather.com/">Suffolk Weather's Weather
Alert Email</a></font></b></p>
<p><font face="Calibri">Good Afternoon, you are receiving this email because
you have subscribed to it through
<a title="http://www.brecklandweather.com" href="http://www.brecklandweather.com">Suffolk
Weather</a> This is our&nbsp; automatically generated email that provides
the alerts that are triggered by the weather station and the&nbsp; current
conditions at the time. If there is any data that you would like to see that is not in
this email or if you wish to unsubscribe then please <b>
<a href="mailto:admin@brecklandweather.com?subject=Suffolk Weather email report
enquiry">
contact me</a></b> and i will get back to you as soon as possible.</font></td>
</tr>
</table>

<br />
<table border="0" width="100%">
<tr>
<td bgcolor="#FFFF99">
<p align="center"><b><font face="Calibri" color="#FF0000" size="4">Current Alarm
WEATHER ALERT 30.0C temperature was exceeded !</font></b></td>
</tr>
<tr>
<td><b><font face="Calibri" size="4" color="#0066FF">
<br>Current Conditions:</font></b><p><b>
<font face="Calibri" color="#336600">Its Afternoon,Sunny/dry and it feels too bloody hot outside. The temperature has been rising for the last few hours. There is a Light Breeze from the West north west</font></b></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Temp:</font></td>
<td><b><font face="Calibri">30.1ºC</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Feels Like:</font></td>
<td><b><font face="Calibri">31ºC</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Temp Change in last
hour:</font></td>
<td><b><font face="Calibri">+1.0</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Pressure:</font></td>
<td><b><font face="Calibri">1021.6 Steady @ -0</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Humidity:</font></td>
<td><b><font face="Calibri">47%</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Humidity Change last
hour:</font></td>
<td><b><font face="Calibri">-3</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Dew Point: </font> </td>
<td><b><font face="Calibri">17.6</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Dew Point
Depression:</font></td>
<td><b><font face="Calibri">12.6</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Wind (average last
10 min): </font> </td>
<td><b><font face="Calibri">3.9 from the West north west</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Gust since
midnight:</font></td>
<td><b><font face="Calibri">16.1 from the&nbsp;WSW @
11:29</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Rain since midnight</font></td>
<td><b>  0.0</b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Rain rate now (if
any)</font></td>
<td><b><font face="Calibri">0.0</font></b></td>
</tr>
<tr>
<td width="231"><font face="Calibri" color="#0033CC">Maximum rain rate
today</font></td>
<td><b><font face="Calibri">0.0</font></b></td>
</tr>
</table>
<br>
<table border="0" width="100%">
<tr>
<td>
<p align="center"><font face="Calibri">Automatically generated &amp; sent by
<a href="http://www.brecklandweather.com/"><b>Suffolk</b></a><b><a
href="http://www.brecklandweather.com/"> Weather</a></b>
using the<br><a href="http://www.weather-display.com">Weather Display</a> software,
version <b>53</b> build
<b>70</b> </font>
</td>
</tr>
</table>
</body>

You can see they are pretty much the same apart from the "out" file has the parsed data

customemailwarningout.txt and customemailwarning.txt are exactly the same

Struggling here, what have i forgot to do please?
Kind regards
Bashy

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Weather alert email shows HTML code
« Reply #1 on: July 05, 2017, 12:41:11 AM »
Bueller?
Kind regards
Bashy

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Weather alert email shows HTML code
« Reply #2 on: July 13, 2017, 03:19:29 PM »
this has been fixed now, latest update of WD

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Weather alert email shows HTML code
« Reply #3 on: July 13, 2017, 03:24:21 PM »
Thank you Brian, appreciate it.
Kind regards
Bashy