Jump to content









Photo

Listener e-mail with date and time

listener email date

  • Please log in to reply
1 reply to this topic

#1 yukardo

yukardo

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 July 2017 - 01:16 AM

Hello everybody,

 

I am using a listener to send me an email when an event happens. But I want to add more information to that email, I was thinking to add the date and time when the event happened.

 

Could you help me to do that?

 

Thanks.



#2 jpastor

jpastor

    Development leader

  • Administrators
  • 159 posts

Posted 17 July 2017 - 06:52 AM

Hi yukardo

 

I have an example with the context of your request and the datetime:

 

import com.carriots.sdk.utils.Email;
def email = new Email();
today = new Date()

email.to="javier.pastor@carriots.com";
email.subject="Carriots Listener sends email";
email.message="Context Data: "+context.data +" Date-time:"+today;
email.send();

 

Regards!







Also tagged with one or more of these keywords: listener, email, date

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users