I am using the ampscript redirect-function to redirect to a thankyou page once a successful insert is completed.




I want the URL for the redirect to include @Email in an encrypted format and once redirected to the thankyou page, @Email should get decrypted.


2 Answers 2


If you really want to encrypt/decrypt the email address, you could use the AMPScript functions "EncryptSymmetric" and "DecryptSymmetric". However if you want to ensure the email address can't be read by an attacker or anyone else it would be a more secure solution to hash the email address and also store this hash in your DataExtension or Subscriber data. On the thankyou page you then check the hash and see which email address/subscriber it belongs to.

Helpful resources:

  • Thanks markus.. One thing if i want to display a modal to the user on the condition of @Status variable.. how to do that.. Oct 30, 2016 at 16:26
  • Just add the If-statement as a single-line AMPScript and place the html/js code that generates the modal between this line and the single-line AMPScript containing the end of the if-statement. Some examples that suit your use case can be found in the marketing cloud documentation: AMPscript 301 Oct 30, 2016 at 18:03

You can also use the MicrositeURL() function outlined by Adam Spriggs.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.