Developer forum

Forum » CMS - Standard features » Email placeholder tags question

Email placeholder tags question

Peter Leleulya
Peter Leleulya
Reply

Hi guys,

I have a question about email placeholder tags usage.

On page https://doc.dynamicweb.com/documentation-9/marketing/tools/email-marketing is stated that an email placeholder tag can be used in mails used in email marketing.

We have a mail for account activation, which is: {{EmailMessaging:Message.DomainUrl}}?Username={{Email:User.UserName}}&PwToken={{Email:User.LoginToken}}&activate=true

When used this generates a very long URL which breaks the mail template layout.
I've tried to put css with word break settings but it didn't help

Preforably I would have a link with a shorter text 'Click here to activate your account' and the long url in the HREF.

On the documentation page is says: Email bodies (on pages) - including in links, for example <a href="/UserInfo.aspx?UserName={{Email:User.UserName}}">Click here to see your profile</a>

But when I put the placeholder tag within the href the link doesn't work anymore ...

When I use <a href="{{EmailMessaging:Message.DomainUrl}}?Username={{Email:User.UserName}}&PwToken={{Email:User.LoginToken}}&activate=true">Click here to activate your account</a> it seems to generate a correct url, but on click it goes to https://******.azurewebsites.net/{{EmailMessaging:Message.Domain}}?activate=true which results into a potentially dangerous request error

Is there another way to establish a Click here to activate your account link in email marketing?

 

 

 


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Hi Peter,

Have you tried without the DomainUrl part?

<a href="/?Username={{Email:User.UserName}}&PwToken={{Email:User.LoginToken}}&activate=true">Click here to activate your account</a>

The domain is added automatically before the email is sent.

Best regards,
Morten

Votes for this answer: 1
 
Peter Leleulya
Peter Leleulya
Reply

Hmz, didn't try that ... thanks!
You might want to update the sample ...

 

You must be logged in to post in the forum