Question

Hello I have URL that looks like this,

http://domain.com?collection=Fashion%20Forward&room=LS1&scene=Scene%20III

This is first created with space, which I string replace with PHP.

What I am wanting to is click a link and open the mail client with the above link in the body of the email, therefore I am doing the following,

<a href="mailto:?body=http://domain.com?collection=Fashion%20Forward&room=LS1&scene=Scene%20III">Email</a>

When the mail client opens the URL is getting cut short and I am only see,

?collection=Fashion Forward why would the whole not be getting put int he body of the email?

No correct solution

OTHER TIPS

In the same way that the %20 is an encoded space, you need to encode the & and = too.

Are you using PHP's URL encode?

Try this :

<a href="mailto:someone@example.com?subject=Your%20Subject&body=http://domain.com?collection=Fashion%20Forward%26room=LS1%26scene=Scene%20III">Email</a>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top