WordPress links/bookmarks – need to urlencode because spaces are getting stripped

You can use the antispambot() function for this.

Example:

<a href="https://wordpress.stackexchange.com/questions/22957/<?php echo antispambot("mailto:[email protected]?subject=Hello there'); ?>">Some link text</a>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)