CParekh
CParekh

Reputation: 13

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!

Upvotes: 1

Views: 235

Answers (2)

bvanvugt
bvanvugt

Reputation: 1242

You'll need to URL encode the email address parameter before passing it to Mandrill.

It looks like you're writing in PHP? Try the urlencode function.

Upvotes: 0

Azd325
Azd325

Reputation: 6140

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

Upvotes: 1

Related Questions