Solved

Action Template Mailto subject and body


Badge +3

We have been trying to use the substitution keywords to get a mailto link to send to customers through an action template that sends an email to our mailboxreader/etm

 

This is mostly working, we can get the  event reference in the subject line,  but cannot get the substitution keywords to populate the body of the mailto.

 

we have tried a few things and its so close but just doesnt put the subject/body in the right place, seems to not be picking up the ? correctly

 

if we do  this it works great, without a body of the email

<vtl>#set($eventLink = "mailto:XXX@test.com?subject=Approved Ref:")</vtl>
<a href="$eventLink$new.event.formattedReference">approve</a>
 

to try to get the body in we tried

<vtl>#set($eventLink = "mailto:XXX@test.com?subject=Approved Ref:")</vtl>
<vtl>#set($eventLink2 = "?body= Approved%0A%0DAdd%20Additional%20comments%20below%20if%20required")</vtl>
<a href="$eventLink$new.event.formattedReference$eventLink2">approve</a>

 

and got  this in the subject with nothing in the body

Approved Ref:S999999?body=Approved

 

 

also tried swapping it round and got stuff n the body but no subject

<vtl>#set($eventLink = "mailto:XXX@test.com?body= Approved%0A%0DAdd%20Additional%20comments%20below%20if%20required?subject='Ref:'")</vtl>
<a href="$eventLink$new.event.formattedReference">approve</a>

 

 

Has anyone managed to get a mailto link working within the action templates/substitution keywords to populate the subject and body of the email

 

Thanks

icon

Best answer by asutliff 28 May 2024, 15:10

View original

4 replies

Userlevel 2
Badge +5

Hi,

 

The following substitution keyword is working for me:
 

<ul>
<a href="mailto:mbr@anycorp.com?subject=Ticket&nbsp%23$new.event.formattedReference Update: &lt;Email Update(Public)&gt;"> Additional Information</a>
</ul>

 

in this case this results in the following clickable link:
Additional Information

when you click on the link the following prepared subject line will appear in the email:
Ticket #52 Update: <Email Update(Public)>

Badge +3

Thanks,  but that doesnt have the body in the email either,  we can get the subject line okay, its getting both the subject and body.

 

Userlevel 1
Badge +5

Hi @kerrylaing - I believe you need to replace the ‘?’ before body to ‘&’

<a href="mailto:XXX@test.com?subject=Approved Ref:&body=Approved%0A%0DAdd%20Additional%20comments%20below%20if%20required"> Additional Information</a>

You can see how this would look by clicking the link: Additional Information

Badge +3

Thanks , that worked 

Reply