Below URL we are using as Un-subscription link in our Exact Target email template. It's working perfectly fine; until someone have "+" sign in Email then user sees an error page.


When I manually replace "+" sign with '%2b' in URL then it works.

Is there a way I can encode/decode or replace Emails with plus sign in URL? I tried URLEncode function but it did not work.

2 Answers 2


I'd opt for using the Base64 encode/decode functions, so you're not passing PII around in the URLs.


SET @email = AttributeValue("Email")
SET @email = Base64Encode(@Email)
<a href="%%=RedirectTo(ConCat('http://example.com/page.aspx?QS=12345&e=',@email))=%%">link</a>

Landing Page

SET @email = QueryParameter("e")
set @email = Base64Decode(@Email,"UTF-8")
<br>Email: %%=v(@email)=%%



You can use Replace AmpScript function to replace emailaddress '+' sign to any other special characters something like below.

Email Code:

SET @Corporation = AttributeValue("Corporation")
SET @RecordType = AttributeValue("RecordType")
SET @Email = AttributeValue("Email")
SET @Email = Replace(@Email,'+','*')

<!DOCTYPE html>
<p><a href="%%=RedirectTo(ConCat('http://pages.abc.com/page.aspx?QS=12345&email=',@Email,'&corporation=',@Corporation,'&recordtype=',@RecordType))=%%">Unsubscribe</a></p>

LandingPage Code:

SET @Email = QueryParameter("email")
SET @Email = Replace(@Email,'*','+')


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.