# add token in email send

**URL:** <https://forum.mautic.org/t/add-token-in-email-send/5040>\
**Category:** Product Support\
**Created:** [August 24, 2016, 1:41pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040 "2016-08-24T13:41:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![JBG](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jbg/32/100_2.png) [@JBG](https://forum.mautic.org/u/JBG)\
**Post date:** [August 24, 2016, 1:41pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/1 "2016-08-24T13:41:10Z")

</div>

Hi, just discovering Mautic, great ! I was wondering if it is possible to add a token in email send to new subsciber on a campaign, like Hello {name}  
  
Thank you  
  
JB

---

<div class="post-metadata">

**Author:** ![JBG](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jbg/32/100_2.png) [@JBG](https://forum.mautic.org/u/JBG)\
**Post date:** [August 24, 2016, 1:41pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/2 "2016-08-24T13:41:10Z")

</div>

Hi, just discovering Mautic, great ! I was wondering if it is possible to add a token in email send to new subsciber on a campaign, like Hello {name}  
Thank you  
JB

---

<div class="post-metadata">

**Author:** ![caleb.hurd](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@caleb.hurd](https://forum.mautic.org/u/caleb.hurd)\
**Post date:** [August 24, 2016, 1:59pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/3 "2016-08-24T13:59:23Z")

</div>

Absolutely! If you are using the regular editor these are some sample tokens (I’m using 1.x still):

a. {webview\_url} – this is the URL to “view the email online”  
b. {unsubscribe\_url}  
c. {leadXYZ – by typing “{lead”, a dialogue will popup showing you the available items for that lead

---

<div class="post-metadata">

**Author:** ![JBG](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jbg/32/100_2.png) [@JBG](https://forum.mautic.org/u/JBG)\
**Post date:** [August 24, 2016, 2:05pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/4 "2016-08-24T14:05:38Z")

</div>

Great, thank’s for this. When typing {name you can then add {contactfield=firstname}‍  
Very good !  
JB

---

<div class="post-metadata">

**Author:** ![Mauticuser07](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mauticuser07/32/758_2.png) [@Mauticuser07](https://forum.mautic.org/u/Mauticuser07)\
**Post date:** [September 29, 2019, 12:44pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/5 "2019-09-29T12:44:30Z")

</div>

Hi! I have a list of contacts who have both emails and Phone numbers. I need to send out personalized emails and messages to these contacts. I want the email version - view in browser url to be mentioned as a link in the text message going to these contacts. Tried {webview\_url} and {webview\_text} in the text message, but that doesn’t seem to work! ☹  
Can anyone please help me out here?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 1, 2019, 3:43pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/6 "2019-10-01T15:43:56Z")

</div>

Hi there @Mauticuser07 and welcome to the Mautic Community Forums!

Can you explain what you mean by those tokens not seeming to work?

You’re right when you mention {webview\_text} (shows the text - e.g. ‘click here to view online’ or whatever you’ve set) or {webview\_url} (shows the link - usually wrapped around some text or a button etc).

Note, when testing make sure you send an actual email rather than a test (e.g. make a segment, add yourself, and then send to the segment) so that the actual tokens are created.

---

<div class="post-metadata">

**Author:** ![Mauticuser07](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mauticuser07/32/758_2.png) [@Mauticuser07](https://forum.mautic.org/u/Mauticuser07)\
**Post date:** [October 2, 2019, 6:28am UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/7 "2019-10-02T06:28:13Z")

</div>

Hi @rcheesley.Thanks for your reply!

It works perfectly well in emails, but i also need to send a text message to the contact with a link where he will be redirected to the view in browser url of the email he receives. Can you please tell me how i can insert the token in a text messsage?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 2, 2019, 4:51pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/8 "2019-10-02T16:51:51Z")

</div>

I found an old feature request here: [https://github.com/mautic/mautic/issues/2135](https://github.com/mautic/mautic/issues/2135) and a query here: [Tokens in SMS](https://forum.mautic.org/t/tokens-in-sms/6630) asking about tokens.

Have you tried using a normal token (e.g. first name) and does that work? Does the unsubscribe one not work? It would be helpful to know what the errors are or what happens in your tests.

---

<div class="post-metadata">

**Author:** ![Mauticuser07](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mauticuser07/32/758_2.png) [@Mauticuser07](https://forum.mautic.org/u/Mauticuser07)\
**Post date:** [October 3, 2019, 7:53am UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/9 "2019-10-03T07:53:49Z")

</div>

Yes, tried {contactfield=firstname} in the text message and that worked! However, what i noticed in the webview url for different customers is the base url remains same and is followed by probably the customer token/id. I’m not able to figure out the variable that stores customer token/id.  
If we get identify that variable, it would definitely work!

View in browser:  
[https://marketing.mauticusername.com/email/view/{variable}](https://marketing.mauticusername.com/email/view/%7Bvariable%7D)

Unsubscribe:  
[https://marketing.mauticusername.com/email/unsubscribe/{variable}](https://marketing.mauticusername.com/email/unsubscribe/%7Bvariable%7D)

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 3, 2019, 3:25pm UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/10 "2019-10-03T15:25:12Z")

</div>

I’m not sure why you’d need to do that, do you mean that the view in browser/unsubscribe tokens are not working when sent via text message?

---

<div class="post-metadata">

**Author:** ![Mauticuser07](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mauticuser07/32/758_2.png) [@Mauticuser07](https://forum.mautic.org/u/Mauticuser07)\
**Post date:** [October 6, 2019, 6:44am UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/11 "2019-10-06T06:44:17Z")

</div>

To explain this better - We have three email campaigns X, Yand Z. Around 150 customers belong to campaign X, 200 contacts - campaign Y, 350 contacts - campaign Z.

All contacts should receive their respective emails and text messages (with link redirecting to the view in browser version of emails they receive).

Inserting {webview\_url} in the text message does not work - tried it

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [October 14, 2019, 10:52am UTC](https://forum.mautic.org/t/add-token-in-email-send/5040/12 "2019-10-14T10:52:55Z")

</div>

I guess it wouldn’t because, why would you want a web-view of a text message? Does the preference centre/unsubscribe link work though? That’s the one you’d want to allow people to manage their preferences or make changes to what communications they receive from you.
