Last sent email information

dasprinzip
Member

Hello,

 

i want to display the "last" (<-- automatically the last) sent mail at the newsletter subsciption page (e.g. inside an iframe) .

 

There is no solution by hubl yet, but support wrote me to post it here - because hubspot-developer maybe read this.

 

I would like to have something like:

mailSent('last','templateName').url;

mailSent('last','templateName').subject;

mailSent('last','templateName').date;

 

Thank you in advance,

Thomas

0 Upvotes
1 Reply 1
dasprinzip
Member

An extended version could be

date = new Date(); // actual or a manually set date

mailSentArray= mailSent(date,n-mails);

console.log('first sent mail from n-mails started from date to past = n:n-mails');

 console.log('last sent mail (latest mail) from n-mails started from date to past = n:0');

console.log(mailSentArray[0].date);

console.log(mailSentArray[0].subject);

console.log(mailSentArray[0].url);

0 Upvotes