I'm trying to pass a personalization string of %%emailaddr%% to a value of a textbox. I've tried using SSJS and AMPscript but it doesn't seem to be working for me unless I have the wrong syntax. I am just looking to use this email value freely throughout the whole HTML page in CloudPages

Here is my attempt:


 VAR @email
 SET @email = emailaddr


<script runat="server">
var email = Variable.GetValue("@email");

Then I would try to put it in a table tag.

        <script runat="server">
          Write("<td width='155' valign='bottom'><input type='text' name='Name1' value=' " + email + " ' id='Name1' /></td>");

My syntax might just be off, but is there a problem with this code?

1 Answer 1


This wont work on a cloud page as the emailaddr personalisation string only works in emails. What you can do is pass this attribute (or retrieve it from) the subscriber context from an email.


  • How would you go about grabbing it from the context? Do you mean from like a URL standpoint? Jun 20, 2018 at 14:58
  • Yes or you can . Either from a form pass or by passing them in the query strings of a cloud page
    – 0xsegfault
    Jun 20, 2018 at 15:05
  • Doesn't this allow for the email just to be changed within the parameters at the top? Or is there a way to like encrypt that. Jun 20, 2018 at 15:17
  • if you use the CloudPagesURL() function , that it will pass the email in an encyrpted string. You can pick this up with the RequestParameter() function
    – 0xsegfault
    Jun 20, 2018 at 15:26
  • I guess for a little more detail, this is being used to build a custom profile center and I just have the profile center link clicking to a cloudpage that I have built. How would I be able to integrate using the CloudPageURL() function while doing that? Jun 20, 2018 at 16:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .