I've got a mailto:
link in a page here including subject=
and body=
parameters but I'm not sure on how to correctly escape the data in the parameters.
The page is encoded in utf-8
so I guess all special chars like German umlauts should be encoded into utf-8
representations for the URL too?
At the moment I'm using rawurlencode()
as urlencode()
would insert +
characters in all locations where spaces should have been but I'm unsure if this is the correct way to do so.
On the Insert tab, click Link or Hyperlink. Under Link to, click E-mail Address. Either type the email address that you want in the E-mail address box, or select an email address in the Recently used e-mail addresses list. If you want to change the link text, in the Text to display box, type the text.
Essentially, an HTML mailto link is a link that triggers the user's default mail client to open so they can reply to a message. If you're a fan of email HTML forms and know your way around the coding aspect of things, a mailto link can be preferable, in some cases.
You just need to rawurlencode()
the link at the end of the email address according the the W3C standards.
There is an example on the PHP Manual for urlencode (search for mailto on that page): http://php.net/manual/en/function.urlencode.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With