Search code examples
mandrillquerystringparameter

mandrill template '@' stripped out from email address


I'm using the Mandrill API to send html email. I have a link in my template that contains a query string with an email address, however the '@' sign is stripped out when receiving the email.

I'm using global_merge_vars thus:

'global_merge_vars' => array(
                        array(
                            'name' => 'merge1',
                            'content' => 'merge1 content'
                        ),
                array(
                    'name' => 'UEMAIL',
                    'content' => $uEmail
                )
                    ),

Example of the link: http://www.test.com/[email protected]

is received as

http://www.test.com/?email=testtest.com

How can I prevent the '@' from being stripped out?

Thanks!


Solution

  • You have to encode your url because the @ sign is special character.