With the proposed changes the boolean flag "$mailto" is passed to the JHtmlEmail::cloak method so the email shown in the contact view is influenced by the email cloak plugins (settings) without triggering it.
Why do it this way?
One could argue that this flag could / should be in com_contact itself and I agree - on the long run, surely the better option. I'm working on a PR for that, too. Regarding the current implementation: I didn't want to call the plugin directly or via JHtmlContent::prepare, since we only need the plugins mode parameter value here.
Test Instructions
Back-end: Create a contact. Give it a title and make sure to fill out the email address field. The contact doesn't have to be assigned to a user or a category. For easy access, create a menu item to that user.
Front-end: Verify that the email address including the mailto link is visible in the front-end. If not, please check the settings for com_contact.
Back-end: Go to the plugin section and edit the "Content - Email Cloaking" plugin. The only parameter there is the "mode" switch. Set / Change it to "Non-linkable Text".
Front-end: Refresh the page. Without the patch you will see that the email address will always have a mailto link attached to it.
Front-end / Back-end: Apply the patch and check again. The mailto link can now be switched on or off via the email cloak plugin.
Closed - Superseded by: #9490