passing watermark in mailto popup?

ashwani_eshoppi
Kilo Expert

I have created a notification email , and there is a link image in it written under notification email script.

On click of the image , i have created a mailto to open a email client.

Now i also want to pass the watermark.

In the same notification script , template.print(email.watermark) shows the required watermark in the email sent.

But if i try to capture this value in a variable, it is returning undefined.

Any idea how to pass the watermark value in mailto. Here is the code snippet from the notification email script

template.print("watermark:"+email.watermark); // --- this code prints the watermark correctly in the email body

var watermark = email.watermark;

template.print(watermark); //---this code prints 'undefined'

var email = "xyz@xyz.com";

var subject = "Feedback&body=Thanks for the feedback.This is an autogenerated email"

var url1 = '<a href="mailto:'+email+'?subject='+subject+watermark'">'+'<img src="emoticon_angry.png" />'+'</a>'; //-- prints undefined in the mail popup in the email body after printing the subject value

template.print(url1);

3 REPLIES 3

ashwani_eshoppi
Kilo Expert

Any idea to pass the value from email body to mailto email popup ?


I was able to do this successfully using ${watermark}


Just to add to this, you have to explicitly print the water, so something like this in your Notification Script:

 

<a href="mailto:'+email+'?subject='+subject+${watermark}