Question about email template. **solved**

This section covers the Meteobridge PRO, PRO2, NANO SD, Raspberry Pi and VM platforms exclusively

Moderator: Mattk

Post Reply
chrysnic
Expert Boarder
Expert Boarder
Posts: 90
Joined: Fri Apr 25, 2014 11:41 am

Question about email template. **solved**

Post by chrysnic »

Hello,

I am preparing an email template that I will use with an "Email Event" on an MB PRO2.

In this template, I would like to use this type of text:

Daily weather report for [YYYY]-[MM]-[DD]

However, instead of today's date (as designated by DD), I would like to use the PREVIOUS DAY's date, i.e., something like "DD-1".

What is the syntax to achieve that? And also, what would happen on the first day of each month, where the previous day would change not only DD, but also MM?

Any help would be appreciated!
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Question about email template

Post by admin »

When you use the periodic event "after each new day" the variables should resolve to the just finished day, not the new one.

When selecting an export result or a generated chart a mail containing that as an attachment is generated and is given the name of the attachment as email subject. The chart cannot be included into the mail body and also email subject is determined by the chart/export file name.
chrysnic
Expert Boarder
Expert Boarder
Posts: 90
Joined: Fri Apr 25, 2014 11:41 am

Re: Question about email template

Post by chrysnic »

Thanks for the reply!

Unfortunately, it did not work. I used the periodic event "after each new day", but the string [YYYY]-[MM]-[DD] resolved to the new date, not the previous (just finished) day. Is there any other way to print the previous day's date?

I guess a less-than-optimal way would be to use the periodic event "before each new day", but it would be nice if there were a "formal" way.

Thank you very much for your time and help.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Question about email template

Post by admin »

sorry, I was thinking wrong here, "before each new day" is the option to go. This is triggered when the day has passed, so you don not miss any data from previous day.
chrysnic
Expert Boarder
Expert Boarder
Posts: 90
Joined: Fri Apr 25, 2014 11:41 am

Re: Question about email template

Post by chrysnic »

Thanks! I confirm that the "before each new day" option has solved my problem.
Post Reply