Accept reject button is not visible

Srini19
Tera Contributor

Hi Expert,

I have written the below code in Email script to get the accept and reject button. But both button is not visible.Please check what is wrong give me any clue? Here attached the button screenshot

 

var apButStr = '<div><a href="mailto:now05@service-now.com?subject=re:' + gr.number + ' - approve&body=' + gr.number + ' - approve' + '"><br /><img style="align: baseline;" title="Click this button to mark approved" src="/approveButton.pngx" alt="Approved" width="142" height="41" align="baseline" /></a>';

var rejButStr = '<a href="mailto:now05@service-now.com?subject=re:' + gr.number + ' - reject&body=' + gr.number + ' - Reject' + ":Reason for Rejection:" + '"><img style="align: baseline;" title="Click this button to mark rejected" src="/rejectButton.pngx" alt="Rejected" width="142" height="41" align="baseline" /></a></div>';

 

var full = apButStr + rejButStr;

template.print(full);
}

 

Thanks

Srini

1 REPLY 1

Maik Skoddow
Tera Patron
Tera Patron

Hi

you reference the buttons with "/approveButton.pngx" but such a kind of reference cannot be resolved by an email client.

The easiest variant is to reference an absolute URL. In that case you have to make sure, that the image can be loaded from that URL.

Another approach is embedding an image via base64 data, for example:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAABzCAMAAA......" alt="SomeImage" />

Kind regards
Maik