Timestamp on email body

dimoss

Well-Known Member
Hi

I have created an article and I use it as a template to send email(s) using the email list plugin.
I wonder if it is possible to add something like a timestamp on the email body to show the time and date the email sent.
I tried to put a php code on the template but as it's not rendered, it doesn't work.
Any ideas?

Thanks in advance.

Dimos
 
Just thinking:
add a timestamp element or date "always return today" + include it in the article
use a php template
 
Hi Troester

Thanks for the ideas. :)
It's easy to add a timestamp element and include it using placeholder in the article but I wonder if it will work on email sending. I will check it anyway and I will add my comments here.
 
Just thinking:
add a timestamp element or date "always return today" + include it in the article
use a php template

I have a date element "always return today" in the article but it doesn't return the date of the email sending.
It just returns the last time the record updated taking the date from the db.
I think the same will happen with the timestamp.
 
Makes sense (as it's not a form but a list plugin, I didn't think about that).
Maybe a calc element returning now() (it's calculated in list view, not sure if it's calculated in the article)?
Otherwise you have to use a php template.
 
I think that the php template is more appropriate.
I checked the sample.php but I have no clue how to make it!
 
for the date, in your PHP template you could add:

PHP:
$date = JFactory::getDate();
echo $date->format('Y-m-d h:m:s');
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top